Turn Mesh Renderer on separate object?

Hello,

I’m trying to turn my HUD back on(or off) when the player hits a trigger. I have a script attached to the trigger that is trying to turn on Mesh Renderers of gameobjects I am using of my HUD (using the tag “hud”):

var waitTime : float = 0.0; var hudFind : GameObject;

function OnTriggerEnter ( other : Collider ) {

 if ( other.transform.tag == "Player" ) { turnOn(); } }

function turnOn () {

WaitForSeconds(waitTime);

hudFind = gameObject.Find("hud");

 hudFind.renderer.enabled = true; }

Try this

function turnOn () {

WaitForSeconds(waitTime);

hudFind = gameObject.Find("hud");

 hudFind.GetComponent<MeshRenderer>().enabled = true; 
}