How To Make Doors

I want to make it so when the player is in front of a door and presses up (Up isn’t the jump button in my game) they teleport to another place in the level. Could someone help me figure how to do this?