Hey all,
I am currently writing an “OnTriggerEnter” script that will ONLY function when the player enters the trigger zone. I am trying to make it so when the player (First Person Controller) enters a trigger zone, it will teleport me to a new scene. The only restriction is the player can be the ONLY thing that sets off the trigger. Here is the script so far:
function OnTriggerStay(hit:Collider){
if(hit.gameObject.tag == "Player"){
Application.LoadLevel (2);
}
}
Can anybody tell me why this isn’t working? Thanks for your help, guys!