What is the best way to save data using standard roblox datastore service?

Hello! Recently, I have been tormented by the question, how best to save data? For example, a player has 3 folders with data: rifles, skins and settings, how best to save them?

  1. Make a table for each folder and then merge all tables into one big table and then save using SetAsync 1 time
  2. For each folder, make a separate data store and save using SetAsync 3 times

I would like to know how secure each method is and what is the chance of data loss if I use one of the methods?
P.S server size 14 players

2 Likes

When it comes to data saving we always want to keep it less painful and make something that’s accurate and that doesn’t make as much requests at all. I’d recommend setting up a single table and putting all your data inside it; this way, it’ll make it easier to deal with it. There’s no need of creating a new datastore for each stat.

3 Likes

Like @Avanthyst said, using a single table is a good idea. I personally would make a module script hold each player’s data in a table that you can easily get. So all you have to do is when the player joins the game, it puts their data into the table and when they leave the game it gets their saved data, saves it and then gets rid of the saved table in the module. I’ve had no issues using my system, and it seems to be a light system.

3 Likes

Thanks for the answer! You helped me a lot, I will use one data store for.

1 Like

Thanks for the answer! I will try to make a data store according to your method.

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