local DataStoreService = game:GetService("DataStoreService")
local dataStore = DataStoreService:GetDataStore("Test")
local allData = {
["Inventory"] = {"Fist"},
["Money"] = {},
["Saved Builds"] ={}
Since there’s a limit to how many times a datastore can be called, having everything in one dictionary will allow you to not have to call datastores as much to save. I can keep adding new entries to this dictionary so why would I need to ever create another datastore? One situation I can imagine is if you reached the max char limit for a datastore, but that is super high at 4million characters.
EDIT: is the scope in my example “Test” or is “Test” the name? If it is the name what is the scope?
What is counted as a character? As in, in my example is [“Inventory”] = {“Fist”} 22characters, 9characters, or 4 characters? I’ve heard that sometimes people convert dictionaries or tables into a large string to later reconvert back into code, but how does this benefit the character count?
Hitting the max of 4 million characters is very difficult, even with big games that store lots of data. The way people find the true length is by calling httpService:JSONEncode on the table and then call string.len on it, and this returns the true length of the data store. So you should be good unless you’re allowing people to have hundreds of thousands of items.