Too much data to save, any ideas to solve this?

Hi, and thanks for stumbling across this tiny post to help me. My name is Kevin, I am a Roblox Developer and I am really in the need of help. My game needs a datastore, but I do not know how to do it. I was wanting to make it in DataStore2 but there’s a tiny tiny problem. I’ve got a lot of data to save. Here’s a list which you can probably skip over

The keys I want to save(You can skip over this, it's just demonstration of every thing I want to save lol

UnlockedAttackers
UnlockedDefenders
UsedAttachmentsOnWeapon1
UsedAttachmentsOnWeapon2(and this goes on and on)
UnlockedWeaponSkins
SkinsEquippedOverWeapon1(etc.)
Wins
Kills
Losses
Assists
Headshots
Warned
Banned
BannedFromLeaderboard
UnlockedHatsOnAttacker1
UnlockedHatsOnAttacker2
UnlockedUniformsOnAttacker1
Rank
RankPoints
MVPNumbers
MatchesQuit
ETC. tons of stuff here

The main issue here is:

I am pretty sure that combining every key and then specifying it… would make roblox throttle and drop some data saving requests/loads… Or I would get an excetion… Any ideas on how to solve this? Or should I move over a other DataStore/DataModule?

Thanks for reading this so far,
Cheers :smiley:

You can save all of that data in a single key by using a Table, specifically a dictionary, you don’t need to save each datum on separate keys.

1 Like

@adark is right, you should create a table like this local Data = {} and filling the table with data like this

local Data = {
    ["UnlockedAttackers"] = {} -- You can make it another table if you want
    -- Or
    UnlockedAttackers = 0, -- Make sure to add a "," or ";" in a table
}
1 Like

Thanks. This helped a lot to me, and uhh… since both of you helped me solve the issue… I’ll just mark your reply as a solution and give the other guy a :heart:

Thanks again :smiley:

3 Likes