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

Help finding a problem?

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.

1 answer

✓ Accepted answer

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!

12 comments

0

Thanks for fixing it! :D Mind telling me what I did wrong?

0

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?

0

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)

0

I previously added a link to a wiki post. Check it out.

0

Oh gosh you did, you know me too well. xD But thanks for the help! :D

0

Lol. No problem.

0

:l I managed to mess it up again with the multi-people thing. xD Want to help me out one more time?

0

Sure. Make a new post

0

I just updated this one, Don't want to spam the forums ya know.

0

Done

0

Yet, once again. Thanks! ^_^

0

Np.

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