Hi wondering if anyone can help, I have this script placed on a Game Object, when my FPScontrolled which is set to “is Trigger” collids with the gameObject the text appears “Door is locked” but when I walk out of the area the text does not disappear anyone know where im going wrong? thank you
var ShowGUI : boolean;
function OnTriggerEnter(info : Collider)
{
ShowGUI = true;
}
function OnGUI()
{
if(ShowGUI == true)
GUI.Label(Rect(400,300,100,20), "Door is Locked");
}
function onTriggerExit(info : Collider)
{
ShowGUI = false;
}