So I am trying to get this script to teleport players at a certain time to bricks called "Spawns" in my game. The problem is that the teleport part of the script isn't working.....
In the output it says the problem is that...."'Spawns' (a nil value)" even though they are in the game.
` spawns = gameChosenClone.Spawns:GetChildren()
for i,v in pairs(game.Players:GetPlayers()) do
name = v.Name
check = game.Workspace:FindFirstChild(name)
if check then
checkHumanoid = check:FindFirstChild("Humanoid")
if checkHumanoid then
check:MoveTo(spawns[i].Position)
end
end
end
for i = 3, 1, -1 do`

2 comments
I forgot to mention that the output also mentioned that the problem was on line 8.
Please post the full script.