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, you know?

Hello! How to fix a script error? Many errors found name "302: SetAsync request dropped. Request was throttled, but throttled request queue was full." and "DataStore request was added to queue. If request queue fills, further requests will be dropped. Try sending fewer requests.Key = 199239304" Who know, can fix the errors for scripts? Screen Game Errors -Screen

1 answer

✓ Accepted answer

DataStore requests have limits, you can't try to request from them or to them too often. For :SetAsync(), that limit is 60 + numPlayers*10 times per minute. That means if there's one player in the game, you can call SetAsync on a certain key 70 times per minute. In your case the problem lies in the while true do loop on line 41. Because of this loop, you've set up a new .Changed event every 0.5 seconds so when the value changes for either of your values, you don't just attempt to save it once, you attempt to save it many many times. If you simply take out the while loop then you should stop getting an error.

4 comments

0

I understand everything, how to do this, so as not to get an error? It's impossible?  

0

Just take out the entire while loop like the cowsoncows said. You only really need to save when the player leaves the game.

0

Yep, saving every time the value changes is risky because you never know how often the function might fire, and players might end up losing data if it throttles. If you wanted you could add a loop that saves every minute or so, that way you won't throttle and there'll be extra security incase it doesn't save when the player leaves.

0

Thx, you best)

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