Best Practice to Save Data

Hello, like I said in title I don’t know which practice is the better.
I will take the case to save 5 folders of the player.
The first :
I save each folder values in differents tables and do only one SetAsync with all tables. So only one datastore and only one key.
The second :
Like the first i’ve got differents table but each table is saved with a SetAsync. So i will get 5 SetAsync, one datastore and 5 keys.

I think the first is the better to prevent the data request queue, but someone can confirm it please :pray:t2:.
Thanks :smile:

1 Like

Of course the first one is better (if I understood what u meant)
You only want to run ONE saving, example, when player leaves game.

And pushing all possible data into one datastore of course.

With your second example would even be better to save 5 different datastores, than trying to overwrite the same datastore 5 times, thats a potential clog for the datastore skills

Okay so save and load data only one time is always better ?

The more tries you do to save the datastore could flood the service yup, I like to only perform 2 handles, when player joins, read all datastores and save data into modules, then when player leaves, takes all data from modules and save it into datastore.

If the data is very important idk, as an event that should be saved after some action, then yeah, save the datastore again during game, but, if its not needed then dont do it.

keep in mind server shutdowns, to save the datastore when that happens

Thank you, but i tried to load and put to a module but my local scripts using some data don’t find the folder, because the load data is too long.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.