I want to make it that when you close your game and open it back, the amount of coins you collected would be saved. I tried with Local Storage but the value of the coins would be stuck on zero. Help.
Develop games in your browser. Powerful, performant & highly capable.
Local Storage generally won't just on it's own. You have to use an array, JSON or dictionary and then save it to local storage. Or better yet, use the native save/load functions.