So i was creating a clicker game and i was setting up the auto save system. When i set it up i somehow messed something up and it gave me a bunch of Strength (my leaderboard stat). When I go to Player > (my user) > leaderstats > Strength and type the Value to 0, it just went back to the big number. Please tell me how I can reset my Strength leaderstat to 0.
``game.Players.ThatGuyYouMetOneDay.leaderstats.Strength.Value(0)
I'm really sorry i don't know how to import the code. Please don't get mad at me!!
I use this code in a normal script, not sure if i'm supposed to put it in local or module. Please help and i'm sorry if this is a very bad representation of this coding language and site.
Hello,
Simply try to use this script instead.
game.Players.ThatGuyYouMetOneDay.leaderstats.Strength.Value = 0
If this still does not work, try going into F9, (the developer console) and insert the script there instead. Make sure you have Enable Studio Access to API Services on. This should work.
You should also make sure that your datastore script is working, so it can save the new stats for your character. If none of this works, you can always make a new datastore called something else. This should obviously reset all player's stats.
Please accept my answer if this helped you out. Simon.
To change values of anything you need to use the equal '=' mark. So instead write this:
game.Players.ThatGuyYouMetOneDay.leaderstats.Strength.Value = 0
And I saw your comment, to make a script line like this one, you can see some icons and letters on top of your writing area. Clicking there, you can change your text style to Bold, Italic, Links, and lines of code