how to attach scripts in unity for going to next level

i create a game in unity 5 when i click play button its doesn’t work so . there is no error
i am use c# code

using UnityEngine;
using System.Collections;

public class PlayMenu : MonoBehaviour {

void onMouseDown(){
	Application.LoadLevel ("Level1");


Do not forget to write OnMouseDown(), and not onMouseDown() !

You have to attach your script to the GameObject you click on as you’re using OnMouseDown().

For example, if you but this script to a Cube you’ve just created it will trigger the function.


Make sure you are also adding “Level1” to the build menu. Otherwise it will not be able to load the level. Even if the level is in your assets folder, it needs to be in the Build Menu as well.

Hope this helps.