What I'm looking for this script to do is allow the people in the "Allowed" table to join the server, but if they're not on the table, their game auto shuts down, but it seems to be kicking everyone, including the Allowed table. Anyone know what I did wrong?
It seems that adding more to the Allowed table breaks it, but I thought you could add more?
Allowed = {"Exbryst"}
game.Players.ChildAdded:connect(function(player)
for _,v in pairs (Allowed) do
if player.Name:lower() == v:lower() then
print("Allowed in.")
else
player:Kick()
end
end
end)
