How To Change Scene Through A Collision?

Thanks for taking the time to help me out I just need to change scene on a collision I already have this code in JavaScript

function  OnCollisionEnter  (collisionInfo : Collision) { if (collisionInfo.gameObject.tag == "finish"){//Change Scene
        Application.LoadLevel("City");
     }
    } 

but this does not work at all

If nothing happens at all the error is probably that the Collision is not triggered (wrong rigidbody/collider setup) or you didn't set the tag for your gameObject correctly. To see how to correctly setup collisions look at the manual. There's a "collision matrix" at the end of each collider's reference page.

In short if you want to receive a collision event one of the two colliding objects will have to be a non-kinematic (dynamic) rigidbody. The other must be a Collider (not a trigger).

You should use a OnTriggerEnter function like this:

function OnTriggerEnter(other: Collider) { if (other.gameObject.CompareTag == "Player"){ Application.LoadLevel("City"); } }

and make the collider a trigger, so when the player touches the trigger, it will load up the level. hope this helps