Hi,
I'm using webstorage to save the total score, but whenever I switch between layouts it either reverts back to 0, or it takes in only the new score without adding in the previous total score.
The conditions are when the player collides with a coin object, it destroys said object and adds variables for 2 local variables. 1 is the new the score which displays separately, and 1 is the what will get saved using webstorage.
When the player is dead/destroyed, the new score gets saved, 'Set local Key 'TotalScore' to Score.Total.'
When I switch layouts, I have a condition that states at the start of the layout to set a text object to 'WebStorage.LocalValue("TotalScore").
Am I doing something wrong?
Any help?