I am lost at the point of adding the player to the table. I am new with tables and have tried many things but nothing seems to have worked. Here is the snippet of the ban script (Its meant for a module script)
local Homeblox = {}
local B = {} --Table I want to add players too
function Homeblox.Ban(plr)
game.Players[plr]:Kick("Homeblox | You have been banned from the server")
table.insert(B, plr) -- I am confused on adding and inserting into tables
game.Players.PlayerAdded:Connect(function(plr)
if plr.Name == B then -- I dont know how to check for it
plr:Kick("Homeblox | You have been banned from the server")
end
end)
end
--Sample of the function that would be ran with player name
Homeblox.Ban("CALEBBEN3")
return Homeblox
Any help would be appreciated, thanks :)

1 comment
Thanks, Ill try and see what works best :)