My script breaks after the round ends

  1. What do you want to achieve? Keep it simple and clear!
    I want my game to stop breaking after the round and the intermission ends

  2. What is the issue? Include screenshots / videos if possible!
    This piece of my script doesn’t work after it used once

for i, v in pairs(game.Players:GetChildren()) do
	local Pos = game.ServerStorage.PlatePositions:GetChildren()[math.random(1, #game.ServerStorage.PlatePositions:GetChildren())]
	Pos.Parent = game.ServerStorage.UsedPos

	local Plate = game.ServerStorage.Plate:Clone()
	Plate.Name = v.Name
	Plate.Parent = workspace.Plates
	Plate.Position = Pos.Position
	v.Character.HumanoidRootPart.CFrame = Plate.CFrame +, 5, 0)
	v.TeamColor = game.Teams.Playing.TeamColor
  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I tried making it a function but it didn’t work
1 Like

Do you run this function every time you need to or do you just run it once?

I run it after an intermission