How does one Save Player location?

So in the game I am making I have the idea of a player going into a device which is like another dimension sort of thing but only for as long as the player chooses and can be taken out of said device and put in at the push of a button (e.g. k)
and when the button is pushed to leave the dimension you get teleported to exact point you were before you entered the device. But I have no idea how to save the player’s location before getting teleported into the device. Help is appreciated.

Use the save game system.

Save Game Doc

Or you can store it in your game instance.

Custom Game instance

So, you need to save position before device activated? When you press button to activate device, you need cast to game instance and write character location to game instance. And when button presseed to leave from dimension again cast to game instance, get character location and set character location to character location you got.

We’ve create a tutorial video on the subject. However our tutorial is completely specialised on the subject of player location saving, including things like making sure to not save player location whilst the player is in mid air, only saving once the player has landed on solid ground.