HttpService Group Info?

Hi there,

I’ve got this code that gets the group’s info and displays it on a Part however i’m unable to get passed the error (HTTP 404 (Not Found) when trying to get the Group ID

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”)

local function playerAdded(player)
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)
local groupID = groupInfo.Id
part2.Decal.Texture = (groupInfo.EmblemUrl)
part.SurfaceGui.GroupNameText.Text = (groupInfo.Name)
local groupData = HttpService:JSONDecode(HttpService:GetAsync(“https://groups.rprxy.xyz/v1/groups/groupID”)) – Place where error occurs
part.SurfaceGui.MembersText.Text = (groupData.memberCount)
end
end
end
end

Players.PlayerAdded:Connect(playerAdded)

It works if i manually put in a Group ID however i’d need it to be picked up when a Player joins and pass it through once i do the checks,

Thanks,

It’s because you didn’t replace groupID with the id, which throws a 404 because the content is not found.

local groupData = HttpService:JSONDecode(HttpService:GetAsync("https://groups.rprxy.xyz/v1/groups/" .. groupID))

This is what you should be doing instead

1 Like

Seems to have done the job for the most part, But i’m now getting this HTTP 429 (Too Many Requests)

You can read this post and learn how to use google apps as a proxy, since https://rprxy.xyz/ seems to rate limit the requests