I'm trying to use this to make a high score system, here's what i have so far.
On start of layout: Check item "HighScore_Key" exists
On item "HighScore_Key" exists: Get item "HighScore_Key"
On item "HighScore_Key" get: Set HighScore to LocalValue.ItemValue
On item "HighScore_Key" missing: Set item "HighScore_Key" to TotalDistance (which is the current score value)
Every tick: highscoretext: Set text to HighScore (which is the global variable)
It starts out like usual but then when the game ends, the number goes right back to 0. Do you know how to fix this?
Thanks for any help!