As the title suggests I'm trying to fix my whitelist. It is pretty simple however my problem is I don't think I know how to compare table data properly:
local Whitelist = {
"lol","leedle","omg","omgronny","xxxtentacion","HEREWEGOOO",
"Radstar1","fajuro"
}
--If their name isn't on the list I want them to be kicked.
game.Players.PlayerAdded:Connect(function(Player)
for _,Name in pairs(Whitelist) do
if string.match(Name,Player.Name) then
return
else
Player:Kick("Not on the whitelist")
print("Kicking "..Player.Name)
end
end
end)
--It'll only work if the first returned value from the table is the player's name. Any suggestions?

1 comment
Awesome this is why I love scripting. Didn't know I could solve it with a simple variable like that. Thanks mate