I have a scene where I have a GUIText object which I have linked to my character prefab.
When I instantiate this in game it creates a clone and the script doesn’t work on the new object.
If I pause the game and drag the prefab onto the GUIText script again and run it it will work fine.
Is there something I need to be doing in my code to make sure I can keep this connection on any instances.
I have added the code it basically looks at the script PickupScore on my prefab which is what is losing it’s connection.
var player : PickupScore;
function Update()
{
GetComponent(GUIText).text = player.score.ToString();
Debug.Log("added value");
}
thanks I am not sure how my question got posted twice but yes this works. thanks
– beelzeboss