Hiya, you can use instance variable on the door to give it an ID, and also another variable to tell it where to move to, this is 2 numbers. So if you overlap a door with ID 2 and move to 3, when you press up it will set position to the door with variable 3. And if you had the door you teleported to with ID 3 and move to 2, then pressing up would move it back to the first door with ID 2 etc
You move by using conditions to pick the correct door, on overlapping door and up pressed, pick door where door.ID = self.moveto.