-
What do you want to achieve?
I want to know what are the causes of this warning:DataStore request was added to queue. If request queue fills, further requests will be dropped. Try sending fewer requests.Key = index
- What is the issue? I dont have any increment scripts or any scripts that would change the value of anything im saving
This is all I have in that game other that datastore2 module and baseplate:
local datastore2 = require(game.ServerScriptService:WaitForChild(“MainModule”))
datastore2.Combine(“DATAKEY”, “MoneySave”, “PoliceXP”, “EMSXP”, “FireXP” , “CriminalXP”)
local defaultPoliceXP = 1
local defaultEMSXP = 1
local defaultCriminalXP = 1
local defaultFireXP = 1
local defaultCashValue = 50
game.Players.PlayerAdded:Connect(function(plr)
local dscash = datastore2("MoneySave", plr)
local dspolicexp = datastore2("PoliceXP", plr)
local dsemsxp = datastore2("EMSXP", plr)
local dsfirexp = datastore2("FireXP", plr)
local dscriminalxp = datastore2("CriminalXP", plr)
local leader = Instance.new("Folder", plr)
leader.Name = "leaderstats"
local currency = Instance.new("IntValue", leader)
currency.Name = "Cash"
currency.Value = dscash:Get(defaultCashValue)
local policexp = Instance.new("IntValue", leader)
policexp.Name = "PoliceXP"
policexp.Value = dspolicexp:Get(defaultPoliceXP)
local emsxp = Instance.new("IntValue", leader)
emsxp.Name = "EMSXP"
emsxp.Value = dsemsxp:Get(defaultEMSXP)
local firexp = Instance.new("IntValue", leader)
firexp.Name = "FireXP"
firexp.Value = dsfirexp:Get(defaultFireXP)
local criminalxp = Instance.new("IntValue", leader)
criminalxp.Name = "CriminalXP"
criminalxp.Value = dscriminalxp:Get(defaultCriminalXP)
local updateCashValue = function(updatedCashValue)
currency.Value = updatedCashValue
end
dscash:OnUpdate(updateCashValue)
local updatePoliceValue = function(updatedPoliceValue)
policexp.Value = updatedPoliceValue
end
dspolicexp:OnUpdate(updatePoliceValue)
local updateFireValue = function(updatedFireValue)
firexp.Value = updatedFireValue
end
dsfirexp:OnUpdate(updateFireValue)
local updateEmsValue = function(updatedEmsValue)
emsxp.Value = updatedEmsValue
end
dsemsxp:OnUpdate(updateEmsValue)
local updateCriminalValue = function(updatedCriminalValue)
criminalxp.Value = updatedCriminalValue
end
dscriminalxp:OnUpdate(updateCriminalValue)
end)