local Players = game:GetService("Players")
local Allow = {
"Dozetopgg",
"Dozetopgg2",
"vasik3000",
}
Players.PlayerAdded:Connect(function(Player)
for i, v in pairs(Allow) do
if Player.Name == v then
print(Player.Name.." "..v)
else
Player:Kick("Server is Closed!")
end
end
end)
I can join you should I add you?
You need to add a break statement in the loop, see if this works`local Players = game:GetService(“Players”)
local Allow = {
“Dozetopgg”,
“Dozetopgg2”,
“vasik3000”,
}
Players.PlayerAdded:Connect(function(Player)
for i, v in pairs(Allow) do
if Player.Name == v then
print(Player.Name…" "…v)
break
else
Player:Kick(“Server is Closed!”)
end
end
end)`
1 Like
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.