why does it say DataStore request was added to queue. If request queue fills, further requests will be dropped. Try sending fewer requests.Key =? I recently made a datastore script and I want to save 2 values but when I do 2 it says - DataStore request was added to queue. If request queue fills, further requests will be dropped. Try sending fewer requests.Key =. why does it do it and how do I fix it? If it is needed I will put the script. Please help script
game.Players.ChildAdded:connect(function(Player) local Lead = Player.leaderstats local Genorosity = Instance.new("IntValue",Lead) Genorosity.Name = "Genorosity" Genorosity.Value = 10 local cash = Instance.new("IntValue",Lead) cash.Name = "Cash" cash.Value = 4000 DataStore = game:GetService("DataStoreService"):GetDataStore("SaveCash") local Key = Player.userId local Data = DataStore:GetAsync(Key) if Data then cash.Value = Data Genorosity.Value = data end end end) game.Players.ChildRemoved:connect(function(Player) local Key = Player.userId DataStore:SetAsync(Key,Player.leaderstats.Genorosity.Value) DataStore:SetAsync(Key,Player.leaderstats.Cash.Value) end)
You should invest your time learning how to make a saving a table instead of single values. This has a lot of benefits:
(this will fix your problem on having to many requests)
I have a test place here that's uncopylocked that you can mess around and my own tutorial here: