PcoWSkbVqDnWTu_dm2ix
We use cookies on this site to enhance your user experience

How to Check a Player's Role in a Group

How to Check a Player's Role in a Group

Oct 01 2018, 1:37 AM PST

The code below will print the name of the rank that the player is currently a part of, in a specific group. In this instance we’re checking what rank the player is within a group which has a group ID of 2.

game.Players.PlayerAdded:Connect(function(player)
    print("Player is ranked as '" .. player:GetRoleInGroup(2) .. "' in group, 'LOL'!")
end)