why won't the level load?

#pragma strict

 var enter : boolean = false;
 
 function Update (){
     if(Input.GetKeyDown("e") && enter)
     {
         Application.LoadLevel("room 1");
     }
 }
  
 function OnGUI(){
     if (enter){
     GUI.Label(new Rect(Screen.width/2 - 75, Screen.height - 100,150,30), "Press E to enter");
     }
 }
  
 function OnTriggerEnter (other : Collider) {
     if (other.gameObject.tag == "Player") {
         enter = true;
     }
 }
  
 function OnTriggerExit (other : Collider) {
     if (other.gameObject.tag == "Player") {
         enter = false;
     }
 }

When i walk into the cube i have that is suppose to be the trigger and i press “e” it doesnt load to the next level. i have trigger selected on the box collider and i have the build settings right. i tried rigid bodies too. is it because i have a lantern layered on a different camera? so the lantern doesnt appear as though its going through walls? i need help badly.

may i know what type of physics you building it like 2d or 3d game.if you are using 3d physics and rigidbody is “rigidboy2d” instead of “rigidbody” ) and adding box colider. it will not take trigger no mater what you do

Use KeyCode.E in your GetKeyDown brackets instead of that string “e” which would normally be used to find input e from the Input Manager; i.e. a virtual button, in conjunction with GetButtonDown.