local player = game:GetService("Players"):WaitForChild("LocalPlayer")
local admin = {"Player",
"Player2",
}
script.Parent.Touched:connect(function(hit)
if hit.Name == "Humanoid" then
for i,v in pairs(admin) do
if player.Name == v then
return admin
else
if player.Name ~= v then
player:Kick("You are not an admin")
end
end
end
end
end)
So I wanted to make a script where if a player touches a brick and they're not in the admin table, they get kicked. If a player touches the same brick and they're in the admin table, then they don't get kicked and nothing happens to them. I wrote this code in a local script, and put it in the brick.
No errors showed in the output, and when I touched the brick, nothing happened.

2 comments
Please use code block.
Check the wiki on how to make a kill brick and how to make an admin door, then combine the two, basically.