I am making a script that is supposed to kick a player if they are not an admin and they are using a tool with a specific name. However, it is not working and not even printing "Activated" when a new child is added. Please help! Script:
local Admins = {"TheLastHabanero","jetmitenClone","CinnamonBunRoller"}
local BannedTools = {"Building Tools","BuildingTools","Delete","Copy","Fly","Noclip"}
game.Players.PlayerAdded:Connect(function(Player)
local Human = Player.Character:FindFirstChild("Humanoid")
Human.Parent.ChildAdded:Connect(function(thing)
print("Activated")
local Admin = false
for i, player in pairs(Admins) do
if Player.Name == player then
print("Player is admin!")
Admin = true
end
end
if Admin == false then
print("Not an Admin...")
for i, tool in pairs(BannedTools) do
if thing.Name == tool then
Player:Kick("Using Banned Tools WIthout Permission")
end
end
end)
end)

3 comments
Thanks! Ill see if it works.
If it works, Ill accept your answer
If it works, Ill accept your answer