How do I move from one level to the next?

hey guys I’m making a 2D game and I can’t make my character move from one level to the next after completing the first?
here is the script

var Application.LoadLevel
function OnTriggerEnter(){
    if(OnTriggerEnter is Collider LoadLevel(Level02));
}

Next time, please format your code using the “10101” button.

Please also include more information, like what language you are using.

To answer your question:

You can’t define Application.LoadLevel as a var, its a function.

use it like so:

function OnTriggerEnter(){
    Application.LoadLevel("Level02");
}

Please tell us whats the Error message. The script of dorpeleg should work fine. Also make sure you have attached it to a gameobject with a collider that is set to “Trigger” and NOT on the player. So when the player reaches the gameobject, it will trigger and load the new scene. Ofc “Level02” must be your scene name.

Application.LoadLevel can take as parameter the index of the level. You define that in the “build settings” of the editor.