for i = 0, #teleplayers do
randomspawn = math.random(1, #spawn_locations)
game.Players:FindFirstChild(teleplayers[i]).Character.Torso.CFrame = CFrame.new(spawn_locations[randomspawn])
wait()
table.remove(teleplayers, i)
wait()
end
For an unknown reason I get the error "argument 1 nil value", so it's like not working out that the teleplayers is a value, which is starting to grind my teeth.

2 comments
That shouldn't be the problem, because I'm trying to change the CFrame, it would be CFrame.new(position)
Hey I'm only answering with what was provided given.