# Restarting the game without losing the variables

**URL:** <https://forums.unrealengine.com/t/restarting-the-game-without-losing-the-variables/783675>\
**Category:** Blueprint\
**Tags:** variables, Variable, game-mode, restart, unreal-engine, Blueprint, question\
**Created:** [March 4, 2023, 3:18pm UTC](https://forums.unrealengine.com/t/restarting-the-game-without-losing-the-variables/783675 "2023-03-04T15:18:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![BDO365](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@BDO365](https://forums.unrealengine.com/u/BDO365)\
**Post date:** [March 4, 2023, 3:18pm UTC](https://forums.unrealengine.com/t/restarting-the-game-without-losing-the-variables/783675/1 "2023-03-04T15:18:25Z")

</div>

Hello guys, I was working on game that when the player dies the game restart after a while but when the game restarted all the values in variables resetting to 0, so how I can restart my game without losing my values.

---

<div class="post-metadata">

**Author:** ![Detach789](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Detach789](https://forums.unrealengine.com/u/Detach789)\
**Post date:** [March 4, 2023, 3:35pm UTC](https://forums.unrealengine.com/t/restarting-the-game-without-losing-the-variables/783675/2 "2023-03-04T15:35:17Z")

</div>

If you just want the player to keep their variables between levels of a continuously running game, you can put the variables in a Game Instance (be sure to add your new game instance as the one being used in the project settings!)

If you want to let the player stop playing the game and then turn it on again later with all their variables, you should use a save game object.

[Here](https://www.youtube.com/watch?v=5w594D3qtLs) is a video on Game Instance, and [Here](https://www.youtube.com/watch?v=_4usRrTiqak) is a video on save game.
