Teleporting player on key press

I have added a door with a trigger next to it, I would like it so that when the player hits the e key they teleports to a new scene. I have use this yet it doesn’t work.

if (Input.GetKey("e")) Application.LoadLevel("Village");

Hello, @GreenWizard33! In your script, call SceneManagement to load the scene if the player pressed the teleport key.

using UnityEngine.SceneManagement;

if( Input.GetKeyDown( KeyCode.e ) ) {
	SceneManagement.LoadScene( "Village", LoadSceneMode.Single );
}

If you don’t want the player to be teleporting while the key is being held down, don’t use Input.GetKey. Use Input.GetKeyDown or Input.GetKeyUp.

Here are some references:

Input.GetKey - Returns true while the user holds down the key identified by name. Think auto fire.

Input.GetKeyDown - Returns true during the frame the user starts pressing down the key identified by name.

Input.GetKeyUp - Returns true during the frame the user releases the key identified by name.

SceneManager