--Seconds, Minutes, and Goal are IntValues
--IsRunning is a BoolValue
local seconds=Workspace.Timer.Seconds.Value
local minutes=Workspace.Timer.Minutes.Value
local started=false
local running
if Workspace.Timer.IsRunning.Value==true then
running="Counting..."
else
if started then
running="Paused"
else
running="Not started yet"
end
end
local goal=Workspace.Timer.Goal.Value
function updatetext()
script.Parent.TimeLeft.Text=(goal-minutes):tostring()..":"..seconds:tostring()
script.Parent.IsActive.Text=running
end
updatetext()
Workspace.Timer.Seconds.Changed:connect(function(v)
seconds=v
updatetext()
end)
Workspace.Timer.Minutes.Changed:connect(function(v)
minutes=v
updatetext()
end)
Workspace.Timer.IsRunning.Changed:connect(function(v)
if v==true then
running="The timer is running"
started=true
elseif v==false then
if started then
local running="Paused"
else
local running="Not started yet"
end
end
updatetext()
end)
12:28:41.266 - Players.Player1.PlayerGui.RaidTimerGui.Timer.UpdateGui:20: attempt to index a number value
12:28:41.269 - Stack Begin
12:28:41.269 - Script 'Players.Player1.PlayerGui.RaidTimerGui.Timer.UpdateGui', Line 20 - global updatetext
12:28:41.270 - Script 'Players.Player1.PlayerGui.RaidTimerGui.Timer.UpdateGui', Line 23
12:28:41.270 - Stack End

1 comment
thank you