This code saves the players in game clothes in a clothes folder. I keep getting the "DataStore request was added to queue. If request queue fills, further requests will be dropped. Try sending fewer requests.Key = 2Clothes-8762695 (x2)"
I have no idea what this means or how to fix it. Here are some excerpts from my script that may be involved in this error.
local key = "2Clothes-"..player.UserId local saved = {} for i,v in pairs(player.Clothes:GetChildren()) do if v.Name ~= "CurrentClothes" then table.insert(saved, v.Name) ds:SetAsync(key, saved) end end end)
Again I have no idea what this is or how to fix it so anything helps. Thank you!
You're calling the datastore a bunch and the game doesn't like that. You're also saving over the last value you inserted in the datastore every time you save something to the datastore in the loop. Instead, you can keep all the close in the saved table and then save that singular table to the datastore.
local key = "2Clothes-"..player.UserId local saved = {} for i,v in pairs(player.Clothes:GetChildren()) do if v.Name ~= "CurrentClothes" then table.insert(saved, v.Name) end end ds:SetAsync(key, saved)