A tiny optimisation: you can just specify the DataStore at the beginning of the script.
1 Like
but this will only make all player data reset, because the first datastore key is changed.
Added! Wasn’t thinking much about it thanks
1 Like
Like me and @BawTheSeal say, we recommend saving all the data’s in one DataStore instead of just making separate ones just to save one data.
1 Like
It will not reset the data, what this does is put all the data in a table then save it to the datastore: “DataSave123”. When loading the data it loops through the table and sets the values.
Example:
--This table is the data being saved, when firing :GetAsync() it will get this same table.
local Data = {
["money"] = 45
["wins"] = 3
}
After getting the table that was saved it loops through it and sets values.
1 Like
ok, now I want to try to test the script that you gave.
it works and also it solves my problem, thank you very much !!
1 Like