I’m willing to make a saving cosmetics system in my game but the thing is, I don’t know how datastores work ;D and I tried testing in another game but I couldn’t work it out, can you, the masterminds help me on this? Thanks.
A lot out there and other options.
This is the Roblox Data Stores version.
Creator Hub - Data stores
Data Stores - Roblox Scripting Tutorial - AlvinBlox
Shepp2004; Datastore Tutorial (Reduce data loss!)
Should be a great start.. enjoy!
Hello!
If you need help with exact details with datastoring then feel free to ask however I’m just going to give a basic guide for now.
There’s multiple ways to do datastoring but if you’re new and don’t feel like you’ll be using TOO much storage then I recommend doing Dictionaries.
Dictionaries are basically a type of table where you have a name then the value, and when calling for the name in that Dictionary you’ll recieve the value.
Once you understand how dictionaries work then make one for the cosmetics, and put strings of the cosmetic’s name.
You COULD try to make a encoding system to turn it into a number which will save on memory however that’s somewhat advanced (and I also have no idea how to do it).
Finally saving and loading the data.
To load data it’s pretty easy, just use DataStore:GetAsync, then just apply it to some table or folder with player data so the server can easily access it.
When saving data just find that table and or folder, and make sure it’s from the right person, then use DataStore:SetAsync.
Also for the key when saving I recommend using the Player’s UserId, and for changing data I recommend making a function to easily modify certain data.
Just want to say this is more of a beginner rather than advanced datastore, there can be so much to optimize but I wouldn’t recommend looking into how unless you have a basic understanding of datastore first.