Get group member count

my code:

local groupId = 10190482 -- Replace with your group ID

while true do
	local response = game.HttpService:RequestAsync({
		Url = "https://groups.roblox.com/v1/groups/" .. groupId
	})

	if response.Success then
		local data = game.HttpService:JSONDecode(response.Body)
		local memberCount = data.memberCount

		print("Group Member Count: " .. memberCount)
	else
		print("Error fetching group data")
	end

	wait(10) -- Refresh every minute
end

error:

HttpService is not allowed to access ROBLOX resources

anyone fix that?

1 Like

Error explains it quite well. You can’t use HttpService and call Roblox to roblox requests. You need to use a proxy.

You would use a proxy and call it from roblox → proxy → roblox group request → give info back to roblox server to be used. (in simple terms)

1 Like

well how would the fixed script look like?

Well you would need to make your own proxy or use a public proxy (not recommend). You just can’t use the link https://groups.roblox.com/v1/groups/GroupId .

well making my own proxy is way too complicateeeeeed

Theres no way around it… Roblox does plan to allow roblox to roblox requests in the future (I think) But as of now, you have to use some sort of proxy

k so i used this tutorial:

but if i want to print the members it returns nil… always…
how to fix?
i got my own proxy now