Loading next level after colliding with an certian object

:)I am trying to get my Project to skip to the proceed to a new level after it collides with a specific object (A Specially Placed Wall For Instance) Thanks to who ever can Enlighting me with awesomness…:wink:

void OnCollisionEnter (Collision collision) {
    
    if (collision.gameObject.tag == "NextLevel") {
        Application.LoadLevel (Application.loadedLevel+1);
    }

}

Trying it NOW! thanks

Is “void” a part of the script?

Yes, its in C#

Heres a JavaScript version:

function OnCollisionEnter (collision : Collision) {
    
    if (collision.gameObject.tag == "NextLevel") {
        Application.LoadLevel (Application.loadedLevel+1);
    }

}

ok i was wondering why it looked so C#ish. Sorry im 13 so my scripting is based of crappy logic

NOOOOO!!! i don’t know what to swap out. WOWWOWWOW Fail on me ~:p