Created
February 2, 2025 03:13
-
-
Save ryanlua/bb8520e816cda866d1d918c3a2e7410e to your computer and use it in GitHub Desktop.
Kick people from a certain group on Roblox. Place this in a Script under ServerScriptStorage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --!strict | |
| local Players = game:GetService("Players") | |
| local groupId: number = 0 -- Blacklisted group id | |
| local kickReason: string = "Your group is blacklisted" -- Kick reason | |
| local function onPlayerAdded(player: Player): () | |
| if player:IsInGroup(groupId) then | |
| player:Kick(kickReason) | |
| end | |
| end | |
| Players.PlayerAdded:Connect(onPlayerAdded) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment