Im making a game like weight Lifting simulator, Every time i lift the weight, i get this error in the output,
DataStore request was added to queue. If request queue fills, further requests will be dropped. Try sending fewer requests.Key = 1198677819
i think its just trying to use datastore too often, but i dont know how to fix it, please help.
Can you give the code that causes the issue?
okay i lied its not weight lifting simulator, its hand eating simulator (a joke game im taking too far)
but heres the datastore script
local stat = "Hands"
local startamount = 0
local DataStore = game:GetService("DataStoreService")
local ds = DataStore:GetDataStore("LeaderStatSave")
game.Players.PlayerAdded:connect(function(player)
local leader = Instance.new("Folder",player)
leader.Name = "leaderstats"
local Hands = Instance.new("IntValue",leader)
Hands.Name = stat
Hands.Value = ds:GetAsync(player.UserId) or startamount
ds:SetAsync(player.UserId, Hands.Value)
Hands.Changed:connect(function()
ds:SetAsync(player.UserId, Hands.Value)
end)
end)
game.Players.PlayerRemoving:connect(function(player)
ds:SetAsync(player.UserId, player.leaderstats.Hands.Value)
end)