OnCollisionEnter() help

heres my script

function OnCollisionEnter (Collision : Collision){

Application.LoadLevel ("Cave");
}

i have it attached to my door but when i walk onto my door (its at an angle) nothing happens except one time it worked, do i have to specify what it is colliding with?

Try doing:

 function OnCollisionEnter (other : Collision){

Application.LoadLevel ("Cave");
}

I would use tags for this one. Also dont forget to add the script to the trigger object and Player should have “Rigid Body” physics.

function OnTriggerEnter(hit : Collider)
{
if(hit.tag == "Player")
{
  Application.LoadLevel("Cave");
}
  else { return; }
}

Make sure you have the scene name (“Cave”) in your Scene Building Column!!!