Transition between levels using 2d colider works once but not repeatidly.

Hello, hoping some one could help. I have 2 levels with a static background. Ontop of these static backgrounds sits a collider that when its clicked, takes you through to the second room and vice-versa. It works once on the first room but not the second. Do I need to declare the 2d collider object from the script? I have already added it as a component to the object.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement; 

public class SceneSwitch : MonoBehaviour {

	// Use this for initialization
	void Start () {
		//SceneManager.LoadScene (Random.Range(0, 6)); make a random scene load!
		//SceneManager.LoadScene (2);
		Scene scene = SceneManager.GetActiveScene();
		Debug.Log("Active scene is '" + scene.name + "'.");
		
	}
		
	//public class ExampleClass : MonoBehaviour {
	//	void OnMouseDown() {
	//		Application.LoadLevel("hall");

	//	}
	//}

	// Bedroom Doors

	void OnMouseDown()
	{
		Debug.Log ("Stop that, it tickles!");
		Application.LoadLevel("hall");
	}



	void OnMouseDown2()
	{
		Debug.Log ("shush!");
		Application.LoadLevel("scene1test");
	}
	
	// Update is called once per frame
	void Update () {
		
	}
}

93351-screen-shot-2017-05-03-at-162855.png

Thanks

Well OnMouseDown() is an event trigger so it is called when a collider (or GUI) is clicked on the other hand OnMouseDown2() is not so it is never called.

int hallSceneIndex;
int scene1testIndex;

void Awake(){
hallSceneIndex = SceneManager.GetSceneByName("hall").buildIndex;
        scene1testIndex = SceneManager.GetSceneByName("scene1test").buildIndex;
}

void OnMouseDown()
    {
        if(SceneManager.GetActiveScene().buildIndex == hallSceneIndex)
            SceneManager.LoadScene(scene1testIndex);
        else
            SceneManager.LoadScene(hallSceneIndex);
    }

Use this script instead, makes sure it is attached to both triggers.