here is a script I made:
function OnTriggerEnter(other : Collider) {
if (Input.GetKeyDown ("e"))
Application.LoadLevel (1);
}
function Awake () {
DontDestroyOnLoad (transform.gameObject);
transform.position = Vector3(71,79,-456);
}
I used it in a door object/mesh, and when I start the game the door suddenly disapear why? I didnt turned the "trigger button
Then I deleted the function awake and the door didnt disappear anymore but the script didnt work either.
please help me!
All i want to do is that the FPS controller teleports to a new scene/level when he preses e in front of the door with the exact position.
As some can guess I still a big noob, I'm aware that I ask for a big help here but it takes time before I can manage all this on my own. thank you.