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

How would you find a player's group rank via scripting?

For example if I wanted a gear that group staff would get but normal members won't, how would I use Lua to differentiate between a staff member and a normal member?

2 comments

0

I already know I would use IsInGroup to see that the player IS in the group, but how would I find a specific rank?

0

Another question: How could I do this with spawns, like a certain rank spawns at a certain SpawnLocation?

2 answers

✓ Accepted answer

GetRankInGroup() returns the number rank of the player it's called on. It's between 0 and 255.

if player:GetRankInGroup(groupId) > 5 then --checks if player is above rank 5

GetRoleInGroup will return the name of the player's rank, or "Guest" if they're not in the group.

if player:GetRoleInGroup(groupIs) == "Knight" then --checks if their rank is knight

1 comment

0

Thanks!

You can use the GetRankInGroup to find a players rank in a group and decide what happens off of that

1 comment

0

To get the actual title of the rank, use GetRoleInGroup.

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