I’ve got this script that gets Group Members via HTTP but i’m getting the Error code: HTTP 429 (Too Many Requests) Note it’s not always but its about 50/50
Script:
local part = game.Workspace.Part
local part2 = game.Workspace.Part2
local GroupService = game:GetService(“GroupService”)
local Players = game:GetService(“Players”)
local HttpService = game:GetService(“HttpService”)
GroupID = nil
local function playerAdded(player)
wait(2)
local groups = GroupService:GetGroupsAsync(player.UserId)
for _, groupInfo in pairs(groups) do
for key, value in pairs(groupInfo) do
if groupInfo.IsPrimary then print(groupInfo.Name,groupInfo.Id)
GroupID = groupInfo.Id
part2.Decal.Texture = (groupInfo.EmblemUrl)
part.SurfaceGui.GroupNameText.Text = (groupInfo.Name)
end
end
end
end
Players.PlayerAdded:Connect(playerAdded)
wait(5)
local groupData = HttpService:JSONDecode(HttpService:GetAsync(“https://groups.rprxy.xyz/v1/groups/“..GroupID..””))
part.SurfaceGui.MembersText.Text = (groupData.memberCount)
This means that you’re sending to many request to the Web Server that is hosting the api.
You could avoid hitting rate limits by making a request at certain intervals.
This is nothing you can fix rather than have good practices, and only make requests when you need too.
Although your rate-limit may reset in about 15 minutes -1h Somewhere in that range. And you’ll be good. As this is the time most Api’s use when setting their rate limits.