I even put the global variables "HighScorePass" and "Score" in their own event sheet, and included that event sheet in both the level sheet and menu sheet. The menu screen is suppose to show the highscore, but when I try to load from local storage, I get a 0. I tried reading other examples, but somehow, when I test, local storage will not pass unto the global variable. I think local storage is finally working, but it just won't pass into the global variable and isntead resets it to 0.
The game itself:
Notice that if you hit refresh, the score resets back to 0?
Here is the screenshot from the menu event sheet:
From the level, where the score gets saved. (Scoresaver variable is only to prevent some buttons from being clickable until after the heroes defeat).
Am I writing it wrong?
EDIT: The stuff thats crossed out is from my various attempts to get localstorage to work. At first it was saving as words, then finally got numbers showing up in debug mode, then NaN for a while, then numbers, and although local storage appears to save the actual highscorenumber in the debug data, instead of loading into the HighScorePass to display in the text on the menu, it just shows as 0.