Sorry I couldn’t be more specific with the question, I really have no idea what’s wrong with this code.
In Unity I want to change scenes when the player enters a certain area, the area has box collier and it is set as a trigger, and the script is attached to that area however when the player enters that area and presses up on their keyboard nothing happens. I have no syntax errors and it says everything is fine. I’m really confused, I hope someone can help.
Here is the code:
var Level = "";
var Player = "";
function OnTriggerStay(other : Collider) {
if(other.tag == Player){
if(Input.GetKeyUp("up")){
Application.LoadLevel(Level);
}
}
}