Variable doesn't seem to save when called in level

Ill keep it short and to the point because I have absolutely no clue why this is happening

https://puu.sh/GlYPF/845b20f0db.png

Above is the code that I have been using to load things, this specifically in the main menu level/widget.
What it should do is just figure out if a scene is playing, so that when the level loads, it doesnt start at the beginning, which you can see below.

https://puu.sh/GlYRX/6fb095e766.png

Now, normally what should happen here, is when this new level loads, it reaches into the gamemode and will grab out my scene variable, which was set above.

However, every single time I have tested this, scene playing has come back and false, and thus I can never reach load data, and it just starts the game from the beginning.

Does anyone have any experience with something like this happening? Could it be because of the widget to level settings? I do most of my other variable checks in the game mode as well, and have yet to come across and issue like this.

I appreciate any possible assistance.

Unless you’re using level streaming, the game mode gets replaced each time you load a level.

Try doing the same thing with the game instance.

( I’m assuming you’re trying to use the game mode to pass the variable between levels? )

Bless. I knew it made no sense that my stuff was breaking despite working quite literally every other time. Knowing now that gamemode changes per level is making me rethink keeping all of my important variables inside it. Thanks friend!

I was completely unaware that happened actually, thanks. Ill check it out and mark the answer if it works.