So I made this round script that makes a gui pop up every time the timer reaches 0 but it only makes the gui pop up once. Is there any way to solve this?
local roundlength = 15
local intermissionlength = 0
local InRound = game.ReplicatedStorage.InRound
local Status = game.ReplicatedStorage.Status
local Camera = workspace.CurrentCamera
InRound.Changed:Connect(function()
if InRound.Value == true then
for _, playerCharacter in pairs(game.Players:GetChildren()) do
local char = playerCharacter.Character
char.HumanoidRootPart.CFrame = workspace.Spawns.LobbyTP.CFrame
end
elseif InRound.Value == false then
for _, player in pairs(game.Players:GetChildren()) do
local playerGui = player:FindFirstChild("PlayerGui")
if playerGui then
local EndGui = playerGui.EndGui
local GameInfo = EndGui.GameInfo
local CameraHandler = EndGui.CameraHandler
if GameInfo.Visible == false and CameraHandler.Disabled == true then
GameInfo.Visible = true
CameraHandler.Disabled = false
end
end
end
end
end)
local function roundTimer()
while wait() do
for i = intermissionlength, 0, -1 do
InRound.Value = false
wait(1)
Status.Value = "TIME: ".. i ..""
end
for i = roundlength, 0, -1 do
InRound.Value = true
wait (1)
Status.Value = "TIME: ".. i ..""
end
end
end
spawn{roundTimer()}
Script works only on server (Not sure about it. Did you checked output?) but never touches local side, most likely your gui pops up once because you put it into starterGui.