find GUIText

hey, I`m trying to make a prefab instantiate and then find a GUIText though i have no idea how so here is what i got:

var PlayerHealthDisplay: GUIText;


function DisplayAmount () {
	if (GUIText){
	PlayerHealthDisplay.text = "" + health;
	}
	
}

function Start () {
	PlayerHealthDisplay = guiText.tag == "Health"; 
}

the console says that it cant convert a Boolean into a UnityEngine.GUIText

GUIText is a type, so you can’t test if it’s null (the if). PlayerHealthDisplay is an object of type GUIText, and you’re trying to assign it a boolean, that’s not possible.

To change the text, you need to do this :

if( PlayerHealthDisplay != null ) 
    PlayerHealthDisplay.text = "Your text here";