Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

DataStore request was added to queue? Try sending fewer requests

My data store wont save and i keep getting this error below. Any tips on how to solve this issue. I get the error after every value when it tries to save. The index key saves but the values wont save

DataStore request was added to queue. If request queue fills, further requests will be dropped. Try sending fewer requests.Key =

game.Players.PlayerRemoving:Connect(function(bot)
    
	local ps = bot.PlayerStats
	local ls = bot.leaderstats
	local stats = {ps.Deaths, ps.Jumps, ps.Wins, ls.Stage}
	    
for key, value in pairs(stats) do
    local success, err = pcall(function()
        ds:SetAsync(bot.UserId, key, value.Value)
    end)
    
		if success then
			print("data saved")
    	else
			print("error data not saved")
        	warn(err)
		end
	end
end)

1 comment

0

Upload the array alone.

1 answer

✓ Accepted answer

You are sending too many requests, and you should SetAsync the stats alone rather than looping!

2 comments

0

how would i go at that?

0

Rather than using for key, value in pairs, just Save the table itself

This discussion is preserved as it was. New answers, comments, and votes are closed.