local banned = {"Epicpan", "LuckTron"}
Player = game.Players.LocalPlayer
while wait(0.5) do
if Player.Name == banned then
Player:Kick()
end
end
Works until I tryed multi-people banning.
local banned = {"Epicpan", "LuckTron"}
Player = game.Players.LocalPlayer
while wait(0.5) do
if Player.Name == banned then
Player:Kick()
end
end
Works until I tryed multi-people banning.
Here's your script fixed up.
--reg script
Banned = {"Epicpan", "LuckTron"}
game.Players.PlayerAdded:connect(function(p)
for i = 1, #Banned do
if p.Name == Banned[i] then
p:Kick()
end
end
end)
-Thank me by accepting this answer/bumping up my reputation!
This discussion is preserved as it was. New answers, comments, and votes are closed.
12 comments
Thanks for fixing it! :D Mind telling me what I did wrong?
Of course. You forgot to put air-quotes and you put () after name (which tells roblox that it's a suspected method). Mind accepting the answer?
I did great help! Tested and it worked! Now just got to get is so I have a list of ban people. Any idea about how to do that? (This is my first shot a scripting)
I previously added a link to a wiki post. Check it out.
Oh gosh you did, you know me too well. xD But thanks for the help! :D
Lol. No problem.
:l I managed to mess it up again with the multi-people thing. xD Want to help me out one more time?
Sure. Make a new post
I just updated this one, Don't want to spam the forums ya know.
Done
Yet, once again. Thanks! ^_^
Np.