How do I make a script that only a certain rank can join the game and if a player doesn't have that rank it kicks them out?
✓ ANSWER ACCEPTED
How can I make a rank only allowed to join?
1 answer
✓ Accepted answer
Have a server script that listens for the PlayerAdded event, then for every player that joins, check their rank in the group you're looking for using the GetRankInGroup method on the player. Check if that rank meets your needs, and if not, then kick the player using the Kick method on the player, optionally providing a reason for the kick.
Hope this helps! :)
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Great, thanks!