game.Workspace.ChildAdded:Connect(function(added)
if added:FindFirstChild("Code").Value == "MapNo3" or "MapNo2" or "MapNo1" then
print("Map is succesfully generated")
local players = game.Players:GetPlayers()
wait(15)
for i,v in pairs(players)do
end
else
warn("Error ")
end
end)
COMMUNITY QUESTION
how to loop through each and every player in the for loop in line 8 ?
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
It loops through all of them already.
for i,v so v is the "object" so for example print(tostring(v)) would print their name
you are already looping in the line 8 to , the player is the v so for example if you want to kick a player you will type inside the loop: ~~~~~~~~~~~~~~~~~ for i,v in pairs(players) do