Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Text in TextLabel not displaying properly?

Asked by 10 years ago

I don't why but the text in Text Label is always 389945 and then the current time bunched up altogether,why? Please show how you manged it fix it.

Example: 389945:939

when the current time is 9:39

while true do
    wait(.1)
--~--~--Varibles--~--~--~--~--
local ClientSeconds = tick()
Hour = math.floor(ClientSeconds/3600)
Minutes = math.floor(ClientSeconds/60%60)
Seconds = math.floor(ClientSeconds%60)
local TimeGui = script.Parent
local SecondsGui = script.Parent.Parent.Seconds
------Removes the Space between Minutes-------
if Minutes < 10--If lower then 10 do the thing below
    then
    TimeGui.Text = Hour..":".. "0"..Minutes--Removes space in Minutes
else
    TimeGui.Text = Hour..":"..Minutes
------Removes the Space between Seconds-------
if Seconds < 10--If lower then 10 do the thing below
    then
    SecondsGui.Text ="0" ..Seconds --Removes Space In Seconds
else
    SecondsGui.Text = Seconds
-------------Main Time Controller-------------
TimeGui.Text = Seconds
TimeGui.Text = Hour..":"..Minutes
wait(.1)
SecondsGui.Text = Seconds
TimeGui.Text = Hour.." "..Minutes
-----------------------------------------------
end
end
end

Answer this question