Is there a way to check if a player is in a group without the player being in game?

I guess I could use the group API, but I’m wondering if there’s a way that doesn’t use HTTPService

1 Like

To my knowledge, The only way you can achieve this is using Group API.

2 Likes
local GS = game:GetService("GroupService")
local plrUserId = 1742355209

function IsInGroup(userid, groupid)
	local plrGroups = GS:GetGroupsAsync(plrUserId)
	
	for _, data in pairs(plrGroups) do
		if data.Id == groupid then
			return true
		end
	end
	return false
end

print(IsInGroup(plrUserId, 7206698))

This uses the GroupService and grabs the specified user’s groups and goes through each one and checks if it matches the group ID that you specified when calling the function.

3 Likes