Unreal Engine 2D load level through a door

I would like to know how you could walk through a door, load a new level, and when you walk back you’re at the front of the door you just walked through

theres a million posts out there on this same topic so not going into detail here, but the basic idea is that you save the location of the player upon entering the door then when you enter the level you set the players location to the saved location. i would have each door have a specified location in the level it leads to, then you have two doors make a set to go each direction. also note that when you save the location you should save it to the game instance since its a non volatile object.

I have a variable that tells when the player leaves the door, and where he needs to spawn. But everytime you load a new level the variable doesnt save, and I dont want to have hundreds of variables in one game instance for every room

I used level streaming and just teleported the player

why would you have a variable in the game instance for each one? you should only need one variable in the game instance. lets say you have a vector which represents the location to spawn in the next level. you would save that vector in the gameinstance when the door is activated, then you would overwrite that the next time you activate a door.