Hello! I was wondering if anyone knows how to make a ban script using tables.
This is currently what i've got.
local name = {"Aiden_12114", "Amanda69"} game.Players.PlayerAdded:Connect(function(player) if player.Name == name then player:Kick() end end)
kingdom5 is wrong because that script is in every server and if its not im stupid and kingom5 is right.
local name = {"Aiden_12114", "Amanda69"}--banned people game.Players.PlayerAdded:Connect(function(player) for i, v in pairs(name) do--looping through the names if v:lower() == player.Name:lower() then --:lower() makes all the letters lowercase player:Kick("Your banned!") end end end)--Also they can just switch their name and then it wouldn't work so I'd recommend looking into UserId
If you do want commands for it then listen to kingdom5. You'll need to save tables in datastore with the people that are banned but if ur not bothered about it and will change it in studio (which is fine but I'd prefer commands).