I have the server firing all clients every second to change the value of a TextLabel on screen, and the intermissionTime variable changing every time the client is fired, but for some reason, the intermissionTime variable only changes once, to 29. My code is below. Thanks!
local timer = script.Parent local intermissionTimer = game.ReplicatedStorage.Events.ChangeTimeIntermission local intermissionTime = 30 intermissionTimer.OnClientEvent:Connect(function() local intermissionTime = intermissionTime - 1 timer.Text = intermissionTime print("client: received server fired, time left is "..intermissionTime) end)
It was me. For some reason, taking away the "local" on line 08 made it work.