Live group counter script not working

so im trying to create a live group counter for my game i made everything and stuff but the output says this:


causing my script to not work thats the group link and here is the script

local groupId = 5838112
 
 
local groupData = game:GetService("GroupService"):GetGroupInfoAsync(groupId)
 
 
local httpService = game:GetService("HttpService")
 
 local url = "https://www.roblox.com/groups/5838112/TacoFace-Studios#!/about".. groupId
 
 
while wait(5) do
   
   
    local memberCount = httpService:JSONDecode(httpService:GetAsync(url)).memberCount
 

    script.Parent.MemberCount.Text = "🔴[LIVE] Members: " .. memberCount
 
 
    script.Parent.GroupImage.Image = groupData.EmblemUrl
    script.Parent.GroupName.Text = groupData.Name
    script.Parent.GroupDescription.Text = groupData.Description
end

please help me i cant fix it so i asked you guys

because you guys are BIG BRAIN

This is actually because roblox doesn’t allow HTTP requests to their site directly, but there are ways around this:

1 Like

it says the page does not exist or is private

Oops, sorry about that, I accidently put a colon after it

1 Like

the video did not work because the web has changed from the past 2 years and does not have somethings shown in the vid or it does i just cant navigate it and im getting a error in the other script
that i got from that

Try using this: https://groups.roblox.com/docs#!/Groups/get_v1_groups_groupId
The HTTP request url would be https://groups.roblox.com/v1/groups/[GROUP ID]
Make sure to wrap the function in a pcall

Not sure if this will work though, since theres is a v2, but it doesnt seem to work

1 Like

As previously stated, you cannot make requests to the Roblox website or APIs from the HttpService. You’ll need to proxy the request using a service such as rprxy.

Also your request URL is strangely formatted. Your URL already contains the group ID, but you have appended it to the hash, which is unnecessary.

The request URL is also for the group’s page on the website, which returns a HTML document. You need to use the groups API to get JSON data, or parse the HTML document yourself.

1 Like