I make a "Happy New Years Simulator" and i must created a television with date and hour/min/sec, for the date, it ok, but for the Hour/Min/Sec, i have a some worries, can you help me for fix this?
Script1 - No Error
local Min = script.Parent.Min
local Sec = script.Parent.Sec
while wait(1) do
Sec.Value = Sec.Value+1
if Sec.Value > 59 then
Min.Value = Min.Value +1
Sec.Value = 0
end
end
Script2 - No Error
local Hour = script.Parent.Hour
local Min = script.Parent.Min
local Sec = script.Parent.Sec
while wait() do
if Min.Value and Sec.Value < 10 then
script.Parent.Text = Hour.Value..":0"..Min.Value..":0"..Sec.Value
elseif Sec.Value > 10 then
script.Parent.Text = Hour.Value..":0"..Min.Value..":"..Sec.Value
elseif Min.Value and Sec.Value > 10 then
script.Parent.Text = Hour.Value..":"..Min.Value..":0"..Sec.Value
end
end
it has no error, just it not work correctly

2 comments
What's it do that's wrong? What's "not work correctly" mean?
The système is not optimal, i search a better way of doing things