Still have questions? Join our Discord server and get real time help.
Log in to vote

How to datastore a large amount of items for a shop?

Asked by 13 days ago

So I have a shop, which will probably have like 20 items when Im done. I want the things players buy to save, but if I use my traditional saving system, the datastore will get full and stop working. Any help on this? Here is my saving system:

local datastore = game:GetService("DataStoreService")
local ds1 = datastore:GetDataStore("JumpPowerSaveSystem")--change all "JumpPower" to what value you want and keep doing it 
local ds2 = datastore:GetDataStore("RebirthsSaveSystem")--change all "Rebirths" to what value you want  and keep doing it
local ds3 = datastore:GetDataStore("GemsSaveSystem")--change all "Rebirths" to what value you want  and keep doing it

 local folder ="Folder", plr)
 folder.Name = "leaderstats"
 local JumpPower ="IntValue", folder)
 JumpPower.Name = "JumpPower"
 local Rebirths ="IntValue", folder)
 Rebirths.Name = "Rebirths"
  local Gems ="IntValue", folder)
 Gems.Name = "Gems"

 JumpPower.Value = ds1:GetAsync(plr.UserId) or 0
 ds1:SetAsync(plr.UserId, JumpPower.Value)

 Rebirths.Value = ds2:GetAsync(plr.UserId) or 0
 ds2:SetAsync(plr.UserId, Rebirths.Value)

 Gems.Value = ds3:GetAsync(plr.UserId) or 0
 ds3:SetAsync(plr.UserId, Gems.Value)


    local leaderstats = plr:FindFirstChild("leaderstats") 
    local jumppower = leaderstats:FindFirstChild("JumpPower") 
    local rebirths = leaderstats:FindFirstChild("Rebirths") 
    local gems = leaderstats:FindFirstChild("Gems") 
      ds1:SetAsync(plr.UserId, jumppower.Value)
     ds3:SetAsync(plr.UserId, gems.Value)

Make a table. DinozCreates 731 — 13d
Can you please demonstrate? CaptainD_veloper 261 — 13d
It is highly unlikely your datastore will go full with just 20 items. The max size for a datastore is around 260000 characters. Rheines 489 — 13d

Answer this question