#Does anyone know how to put wait() then make the text invisible without it breaking?

1 messages · Page 1 of 1 (latest)

nimble flicker
#

local RunService = game:GetService("RunService")

local StartTimer = game.ReplicatedStorage.StartTimer
local StopTimer = game.ReplicatedStorage.StopTimer

local StartTime = nil
local running = false

local debounce = false

StartTimer.OnClientEvent:Connect(function()
if not running then
script.Parent.Visible = true
StartTime = tick()
running = true
end
end)

StopTimer.OnClientEvent:Connect(function()
StartTime = nil
running = false
end)

RunService.Heartbeat:Connect(function( )
if running then
script.Parent.Text = string.format("%.1f", tick() - StartTime)
end
end)

#

so if i put wait() then script.parent.visible = false after "StopTimer.OnClientEvent:Connect(function()
StartTime = nil
running = false"

#

it works but in the second try it shows but then it disappears after a while

#

Does anyone know how to put wait() then make the text invisible without it breaking?

nimble flicker
#

it works now

pearl elbow
#

only thing i see really is you have script.Parent.Visible = true but not the opposite

pearl elbow