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
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.