Hello! Im Quite New Here but i’ve actually Started Scripting UnityScript!
But there is a Problem with this script somehow. it won’t work! I have 1 Script that changes the GUI Text when The Player Collid with the “Box”. but somehow. It won’t work
Any Ideas?
Script:
var targetGuiText : GUIText;
function OnControllerColliderHit(collision:Collision)
{
if(collision.gameObject.tag == "Player")
{
targetGuiText.text = "A Way out!";
yield WaitForSeconds(3);
targetGuiText.text = "There must be a way out..";
yield WaitForSeconds(3);
targetGuiText.text = "But where?";
yield WaitForSeconds(2);
targetGuiText.text = "";
}
}