Ok this has been confusing me for days. So the round script I made works for a few rounds then completley breaks, it says the error is in here, why does it break after a few rounds?
local SpawnPoints = ClonedMap:FindFirstChild("SpawnPoints")
if not SpawnPoints then
print("Spawn points not found")
end
local AvailableSpawnPoints = SpawnPoints:GetChildren()
for i, player in pairs(game.Players:GetChildren()) do
if player then
character = player.Character
if character then
character:FindFirstChild("HumanoidRootPart").CFrame = AvailableSpawnPoints[1].CFrame + Vector3.new(0,5,0)
table.remove(AvailableSpawnPoints,1)
end
end
end
This is in a while true do loop
Cloned map is the map that was randomply chosen, and spawn points is a model inside the cloned map were players will be teleported to. It chosen one of the few spawn points then teleports the player there. (Once again, it works for a few rounds then breaks)
Whats wrong?

2 comments
what line was that error on?
You slowly remove spawn points on line 15 and in this script you are not adding them back, the table just runs out of spawn points.