Skip to content

Instantly share code, notes, and snippets.

@ryanlua
Created February 2, 2025 03:13
Show Gist options
  • Select an option

  • Save ryanlua/bb8520e816cda866d1d918c3a2e7410e to your computer and use it in GitHub Desktop.

Select an option

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