Hey all, I'm working on a minigame script and my loop only teleports one player. I've tried many different solutions and researched many times but no luck.
I tried using the same for loop in another script and it prints out multiple players (only in a while loop). However, this one only prints out one player and not the rest.
for i, v in ipairs(game:GetService("Players"):GetChildren()) do print(i,v) --only prints out one player local name = v.Name local check = workspace:FindFirstChild(name) if check then local humanoid = v.Character:FindFirstChild("Humanoid") if humanoid then v.Character:MoveTo(spawns[i].Position) --only one player teleports local InGame = v.InGame InGame.Value = true TimeUntilEnd(GameTimer) local points = v.leaderstats.Points local wins = v.leaderstats.Wins -- wins and losses if InGame.Value == true then print("you win") table.insert(winTable, name) points.Value = points.Value + 50 wins.Value = wins.Value + 1 else print("you lost") end end end end