Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Ban script special for one user?

I would like a help, please. How can I make a ban script special for one player? And probably a special message, So, Example: brick_man joined, He got banned. The red box on top said "You mess with me, You got banned".

How do I do it?

1 answer

Here you go. :) Server script inside ServerScriptStorage

local banned = {"NameOfPlayerWhoIsBanned"}
local prefix = "[Banned] "
local message = "You are banned from the server!"

game.Players.PlayerAdded:Connect(function(player)
	for _, v in pairs(banned) do
		if player.Name == v then
			player:kick(prefix..message)
		end
	end
end)

1 comment

0

Explain your answers.

This discussion is preserved as it was. New answers, comments, and votes are closed.