script error!!??

hey guys i have made this script it works only when i exit the trigger the text doesnt go away i think iv done somthing wrong with the active render = false; but dont know for sure

can some one tell me what iv done wrong?

var Component : GUIText;

function OnTriggerEnter(other : Collider) {
     Component.guiText.text = "Press f to talk to the Comander";
}

function OnTriggerStay(other : Collider) {
    if( Input.GetKeyDown( "f" ) )
    {
        audio.Play(03);
    }
}

function OnTriggerExit(other : Collider) {
     Component.guiText.text = "Press f to talk to the Comander";
     active = false;
}

var Component : GUIText;

function OnTriggerEnter(other : Collider) {
     Component.guiText.text = "Press f to talk to the Comander";
}

function OnTriggerStay(other : Collider) {
    if( Input.GetKeyDown( "f" ) )
    {
        audio.Play(03);
    }
}

function OnTriggerExit(other : Collider) {
     Component.guiText.text = "";
     active = false;
}

This makes the actual object disappear, I think you wanted the GUI Text too. So I made it an empty string, which works fine, and keeps it there. Does this work, or no?

And to add.

If you just wanted the text to become invisible another way, you can use:

http://unity3d.com/support/documentation/ScriptReference/Behaviour-enabled.html?from=GUIText

Then you can enable it when you want.

This is just as effective as not rendering it.

If you don't want it to not render the object you're colliding with, then just take out that active line.

Hope this helped! =)