Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Is there a maximum number of items that can be saved in one data store?

The title says it all. My question is are there any limit on how many values can be saved in one data store? Could I do something like this:

DataStore:SetAsync(key, Value1) 
DataStoreSetAsync(key, Value2)
DataStore:SetAsync(key, Value3) 
DataStoreSetAsync(key, Value4)
DataStore:SetAsync(key, Value5) 
DataStoreSetAsync(key, Value6)
DataStore:SetAsync(key, Value7) 
DataStoreSetAsync(key, Value8)
DataStore:SetAsync(key, Value9) 
DataStoreSetAsync(key, Value10)

-- Etc

If there is limits can you have mutiple data stores in one game? Another thing would be do I have to create multiple key variables for the different datastores? Example:

local DataStore1 = game:GetService("DataStoreService"):GetDataStore("Name1")
local DataStore2 = game:GetService("DataStoreService"):GetDataStore("Name2")

local Key1 = "Plr-".Plr..UserId
local Key2 = "Plr-".Plr..UserId

Thanks!

1 answer

✓ Accepted answer

In your first example, all it would do is overwrite the previous data that was saved in the key. It doesn't save the data and keep backups it overwrites the data that was in there and replacing the nothing with the value you provide.

As for your second question, there aren't any limits for each datastore but it is good practice to have multiple key variables for different things. What I sometimes do is place a bunch of data in a table, and then save that table into the datastore so it only takes up one spot.

Hope this helped!

2 comments

0

Thanks!

0

It helped!

This discussion is preserved as it was. New answers, comments, and votes are closed.