Intermission script not working

I recently wanted to make a Intermission/lobby game but it wouldn’t work, I would appreciate feedback or help. Thanks!
here are the scripts.

the LocalScript

local Status = game.ReplicatedStorage.Status
local TimerDisplay = script.Parent.TimerDisplay

Status.Changed:Connect(function()
	TimerDisplay.Text = Status.Value
end)

This script is inside a intermission GUI inside StarterGUI

this is the script inside ServerScriptService

-- Round Variables
local roundLength = 5
local intermissionLength = 10
local inRound = game.ReplicatedStorage.inRound
local Status = game.ReplicatedStorage.Status

local LobbySpawn = game.Workspace.LobbySpawn
local GameAreaSpawn = 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.Chracacter
			char.HumanoidRootPart.CFrame = GameAreaSpawn.CFrame
		end
	else
		for _, player in pairs(game.Players:GetChildren()) do
			local char = player.Chracacter
			char.HumanoidRootPart.CFrame = LobbySpawn.CFrame
	    end
	end
end)



local function roundTimer ()
	while wait() do
		for i = intermissionLength, 1, -1 do
			inRound.Value = false
			wait(1)
			Status.Value = "Intermission: ".. i .." seconds left!"
		end
		for i = roundLength, 1, -1 do
			inRound.Value = true
			wait(1)
			Status.Value = "Game: ".. i .." seconds left!"
		end
	end
end

spawn(roundTimer)

there are also two Values
a string value called Status
and a Bool value called inRound
they are both in ReplicatedStorage.

Where are you incrementing the status??

it’s in the Local Script, the function in the local script

You are not changing the status value, you are setting the GUI text to the status value, but the status never changes!

ohh, ok thanks for your help. it works now :grinning:

1 Like
Status.Value = "Intermission: ".. i .." seconds left!"

Was the post edited? The value of the status is being changed here.

1 Like