local banland={"xMegs"} game.Players.PlayerAdded:connect(function(newPlayer) if banland then banland:Kick() end end)
I got stuck on the if statement. Any help?
local banland={"xMegs"} game.Players.PlayerAdded:connect(function(newPlayer) if newPlayer.Name==banland then newPlayer:Kick() end end)
Sorry if this doesn't work
wait(0) local banland={"xMegs"} game:service("Players").PlayerAdded:connect(function(plr) for i=1,#banland do if plr.Name:lower()== banland[i]:lower() then plr:Kick() end end end)
local banland={"xMegs"} game.Players.PlayerAdded:connect(function(newPlayer) for _, list in pairs(banland) do --Iterates through banland. if newPlayer.Name:lower() == list:lower() then --Checks if name is equal to a string in banland newPlayer:Kick() --Kicks player end end end)