Intermission system

Hi guys, what am I supposed to delete and change in this intermission script so that when the game is over, players return to their exact position before the game started

local rushtime = 60
local intermission = 250
local InRound = game.ReplicatedStorage.InRound
local status = game.ReplicatedStorage.Status

local LobbySpawn = game.Workspace.LobbySpawn
local GAS = game.Workspace.GameAreaSpawn

InRound.Changed:Connect(function()
wait(1)
if InRound.Value == true then
for _, player in pairs(game.Players:GetChildren())do
local char = player.Character
char.HumanoidRootPart.CFrame = GAS.CFrame
end
else
for _, player in pairs(game.Players:GetChildren())do
local char = player.Character
char.HumanoidRootPart.CFrame = LobbySpawn.CFrame
end
end
end)

local function goldRushTime()
while wait() do
for i = intermission, 1, -1 do
InRound.Value = false
wait(1)
status.Value = “Next Gold Rush in: “…i…” seconds!”
end
for i = rushtime, 1, -1 do
InRound.Value = true
wait(1)
status.Value = “Time left: “…i…” seconds!”
end
end
end

spawn(goldRushTime)

Make sure to format the code so it’s easier to tell the difference and to explain the issues, anyways…

Why are you making the humanoidrootpart’s cframe teleport at a cframe? It should be like this.

char.HumanoidRootPart.CFrame = CFrame.new(LobbySpawn.Position)

Anyways, make sure to post a picture of the error output if it has an error about the script or just claim there’s no error if you don’t find any error correlating to the script, also change this code line.

char.HumanoidRootPart.CFrame = CFrame.new(GAS.Position)