In your opinion, what would be the best way of getting a player’s data and saving it as an array/table?
What I am trying to work with is something like
local Data = {
["Spells"] = {["Lightning"] = 1}
}
And being able to add to tables / manipulate them from the data store.
So if I were to call the data I would be returned a table that could be read from and changed at will.
I know a lot of basic datastore scripts but I’m looking for something that can work in the same way that dictionaries/arrays work to make it easier on my head.
Use @loleris 's ProfileService, this has been one of the best datastores you can use in my opinion, as it prevents data loss/dupication, allows for the table to be edited, and pretty much handles the saving table/strings for you.
If you’re trying to set up your own way of saving tables, I wish I could explain it to you but rn I don’t have the time.
I’ll be writing about this soon on a blog post, keep your eyes peeled
Regarding your question, you can set up a table with player data by setting the player’s name or ID equal to a table like this example: Table[player.Name] = {}
Next you can create a variable equal to Table[player.Name] and start creating different things to save like cash: Variable[“Cash”] = 0
When you want to save the table, all you need to do is have the table returned, and save it! It’s pretty simple!