Maybe that isn't the best way to ask it, but what I need to do is check if a player is of a certain rank in a group, using strings instead of the role value. I do not have access to the group admin, I'm scripting something for a friend, and he can't get me the role values. I saw this used in an old theater game, but I've since forgotten how it was done. Any help?
✓ ANSWER ACCEPTED
How would I get the string name of a role, from a group?
2 answers
✓ Accepted answer
There is a function in Playercalled GetRoleInGroup(), which is similar to GetRankInGroup()but returns a string rather than a number. Here is a more detailed description.
use
if player:GetRoleInGroup(id) == "rankname?" then
-- stuff here
end
or
if player:GetRankInGroup(id) == 255 then
print("player is owner of group")
end
GetRoleInGroup() gets/return the rank as a stringvalue while the GetRankInGroup() does it is as a number value.
This discussion is preserved as it was. New answers, comments, and votes are closed.
