Ok. So I have been practicing Unity-Script and i thought this script would work for the player upon entering a trigger that it would show a GUI text. Well, it didn’t work. Here is the raw code:
#pragma strict
var Text : GUIText;
function Start ()
{
Text.enabled = false;
}
function OnTriggerEnter (Col : Collider)
{
if (Col.tag == "Player")
{
Text.enabled = true;
}
}
function OnTriggerExit (Col : Collider)
{
Text.enabled = false;
}
I honestly thought it would work and yes i do have the character controller set to Player as the tag. Any help on this?