Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How would I make the timer not be visible after the countdown is finished?

wait()

local mFloor = math.floor 
local Next = next 
local Tick = tick 
local Wait = wait 
local Stop = 0

while true do Wait(1) 
wait()
local Time = 1589098260 - Tick() 
local Days = mFloor((Time / 60 / 60 / 24) % (365 + 0.2425)) 
local Hours = mFloor((Time / 60 / 60) % 24) 
local Minutes = mFloor((Time / 60) % 60) 
local Seconds = mFloor(Time % 60) 

if Stop == 0 then

script.Parent.Time.Text = Days.."D "..Hours.. "H "..Minutes.."M "..Seconds.."S"
end

if Days==0 and Hours==0 and Minutes==0 and Seconds==0 then
Stop=1
script.Parent.Time.Text = "Live Event"

if Days==0 and Hours==0 and Minutes==0 and Seconds==0 then -- This did not work
game.StarterGui.Countdown.Frame.Visible = false

end
end

end 

1 answer

I Think I fixed it :D

wait()

local mFloor = math.floor 
local Next = next 
local Tick = tick 
local Wait = wait 
local Stop = 0

while true do Wait(1) 
wait()
local Time = 1589099520 - Tick() 
local Days = mFloor((Time / 60 / 60 / 24) % (365 + 0.2425)) 
local Hours = mFloor((Time / 60 / 60) % 24) 
local Minutes = mFloor((Time / 60) % 60) 
local Seconds = mFloor(Time % 60) 

if Stop == 0 then

script.Parent.Time.Text = Days.."D "..Hours.. "H "..Minutes.."M "..Seconds.."S"
end

if Days==0 and Hours==0 and Minutes==0 and Seconds==0 then
Stop=1
script.Parent.Time.Text = "Live Event"

wait(2)
	 script.Parent:Destroy()
	
	 end 

end

This discussion is preserved as it was. New answers, comments, and votes are closed.