trying to make a round style game with a countdown that teleports you to and from the lobby the teleport part works but the countdown GUI only says Label.
script in server script service
local roundLength = 10
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.Character
char.HumanoidRootPart.CFrame = GameAreaSpawn.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 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)
localscript in screengui
local Status = game.ReplicatedStorage.Status
local TimerDisplay = script.Parent.timerDisplay
Status.Changed:Connect(function()
TimerDisplay.Text = Status.Value
end)

1 comment
the gui only says 0 now, no errors.