Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Checking if player is in group?

So I've made a quick line of code which is

if script.Parent.Parent.Parent.Parent.Parent.Parent:IsInGroup(3272883) > 0 then

Will the:

IsInGroup(3272883) > 0 

Will the 0 be the rank within the group? If so what is Thanks.

1 answer

✓ Accepted answer

No, the function:

player:IsInGroup(3272883)

will return a Boolean value, true or false. In order to get the player's rank in a group you can use the following:

player:GetRankInGroup(3272883) -- This will return a Integer value, the rank in the group

player:GetRoleInGroup(3272883) -- This will return the name of the role, a String value.

This discussion is preserved as it was. New answers, comments, and votes are closed.