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?
There is a function in Player
called 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 theGetRankInGroup()
does it is as a number value.