I've seen a lot of scripts that are supposed to do this, but none of them seem to work correctly. I've tried to make my own, but it didn't work correctly either (and I've since deleted the script, so I can't post it here either).
Basically, if I'm in studio, and I test the game, I click on the "Players" tab and then I click on myself, and I see 7 folders. I want to save 2 of them in particular: leaderstats and playerstats. The leaderstats folder contains 3 StringValues, for money, blocks mined, and depth. The playerstats folder contains a lot of NumberValues, one for each ore in my game.
It would also help if I could save the players' backpacks between sessions. This is another one of the folders, and it just contains a pickaxe, but eventually players will be able to upgrade their pickaxes, and I want the upgrades to save.
Is there any actual way to do this?
https://scriptinghelpers.org/guides/saving-and-loading-data-with-datastores
This guide does a better job of explaining than I’ll ever be able to. As far as players backpacks the way I do this is that whenever they purchase an item I have a bool value and I turn it from ‘false’ to ‘true’, if true the item will be added to the players backpack and startergear when they load back in. You could even use this method for upgrading, you’d just turn the previous tool to false and the next one to true. You WILL need remote events for doing this. I don’t know how much you know about datastores(if anything) or remote events so if you have any specific questions feel free to ask.