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

How to Check if a Player is in a Group

How to Check if a Player is in a Group

Oct 01 2018, 1:38 AM PST

The below example will print “Player is in the Roblox Fan club!” if the newly added player is in the group with a groupId of 7.

game.Players.PlayerAdded:Connect(function(newPlayer)
   if newPlayer:IsInGroup(7) then                    
      print "Player is in the Roblox Fan club!"     
   end
end)