Hey. I’m currently working on an automatical group rank bot, through a website called “Glitch”. When I actually fire the event, I get this error:
The thing is, that I fire, or at least intend to fire only one event, meaning only make one HTTP Request. Therefore, I don’t understand why I am exceeding the request limit.
Code for the request function:
local GlitchURL = "https://sfpd-xpsystem-rankingbot.glitch.me/"
game.ReplicatedStorage.RankInGroup.OnServerEvent:Connect(function(UserId, RoleId)
game:GetService("HttpService"):GetAsync(GlitchURL.."ranker?userid="..tostring(UserId).."&rank="..tostring(RoleId))
end)
The first arg to onServerEvent() is the Player object btw, you’ll need to add it before UserId. As the other poster said, your LocalScript is probably sending the event repeatedly.
This is caused by your client firing the remote rapidly and constantly. It would help if you send the client sided code here so that we can further assist you.
Oh, I just realised the issue is really in the client loop. What should I add for it to fire only once?
while wait() do
if XP.Value == 0 then
Level.Value = 0
elseif XP.Value == 6 then
Level.Value = 1
game.ReplicatedStorage.RankInGroup:FireServer(player, 1)
rankupTextFunction()