I’m working on a skin system in my game the skins themselves work and the other players can see the skins but I’m saving whether or not a skin is unlocked in a local storage variable witch keeps randomly reseting itself and it resets when the page is reloaded.
I’m very confused it mainly resets when it gets read and when another local storage item gets set
By taking a quick look at your scripts, you seem to be clearing and then changing the value using localStorage.set. Normally, you wouldn’t need to do that, you can just use set to change the value from true to false, so is there any specific reason as to why you are clearing it every time before setting the value?
Can you please let me know which script is fixed and which one is still faulty? In ChooseSkin.js I saw that you are still clearing and then setting the localStorage, so I assume there is a special reason for that particular script?