Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can I make a rank only allowed to join?

Asked by
D3VRO 66
6 years ago

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?

1 answer

Log in to vote
0
Answered by
chomboghai 2044 Moderation Voter Community Moderator
6 years ago

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! :)

0
Great, thanks! D3VRO 66 — 6y
Ad

Answer this question