Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you fix this error "Request Was Throttled.Try Sending Fewer Requests."?

Asked by 6 years ago

This is the LocalScript

01xpChanger.OnClientEvent:Connect(function(xpGiven)
02    -- Save xp
03    local curXp,curLvl = saveReturn:InvokeServer(xpGiven)
04    -- Math
05    local percentage = curXp/(10*curXp)
06    local newXOffset = percentage*xOffsetXp
07    -- Apply
08    xpDisplay:TweenSize(UDim2.new(xScaleXp,newXOffset,xScaleXp,xOffsetXp),'Out','Quad',.5,false,nil)
09    lvl.Text = 'Lvl: '..tostring(curLvl)
10    xp.Text = 'Xp: '..tostring(curXp)
11end)

This is the Script

01local bool,message = pcall(function()
02    saveReturn.OnServerInvoke = function(plr,xpGiven)
03        local key = 'Player-'..plr.userId
04        local curLvl = lvlDataStore:GetAsync(key)
05        local lvlEquation = 10*curLvl
06        -- Adds lvls and sets xp
07        if curLvl == 0 and xpGiven == 10 then
08            xpDataStore:SetAsync(key,(xpGiven - lvlEquation))
09            lvlDataStore:SetAsync(key,(curLvl+1))
10            print(curLvl+1)
11            return xpDataStore:GetAsync(key),lvlDataStore:GetAsync(key)
12        elseif lvlEquation == xpGiven then
13            xpDataStore:SetAsync(key,(xpGiven - lvlEquation))
14            lvlDataStore:SetAsync(key,(curLvl+1))
15            print(curLvl+1)
View all 25 lines...
0
Look at how many times you're sending requests. There should be a 6 second cool down between requests User#19524 175 — 6y
0
I made it immediately RichCookieGamer 7 — 6y
0
It says "Try Sending Fewer Requests." sooooooo you need to Try Sending Fewer Requests. http://robloxdev.com/articles/Data-store limitations are shown on this page INOOBE_YT 387 — 6y

Answer this question