For some reason my datastore keeps requesting too fast. I can’t seem to figure out what is making it do this. Any help?
game.Players.PlayerRemoving:Connect(function(plr)
local Success, ErrorMsg = pcall(function()
local GearsSaved = {}
for i, gearname in pairs(plr.Backpack:GetChildren()) do
if gearname then
table.insert(GearsSaved, gearname.Name)
end
end
wait()
MyData:SetAsync(plr.UserId.."-gears", GearsSaved)
end)
if Success then
wait(3)
else
print("Ran into a problem saving "..plr.Name.."'s Gears. Check for error below.")
wait(3)
error(ErrorMsg)
end
end)
end)