I’m trying to make a VHS like game with a timer that shows how long you have been recording/playing the game, but the numbers aren’t in order. I have placed a picture of how it looks like and how it should look like: (the timer on them both is at 3 seconds btw)
How it looks like:
How it should look like:
Code:
wait(4.75)
function toHMS(seconds)
return string.format("%02i:%02i:%02i", seconds/60^2, seconds/60%60, seconds%60)
end
function updatetext(updateto,text)
for i_,v in pairs(text:GetChildren()) do
if v then
if not v:IsA("UIListLayout") then
v:Destroy()
end
end
end
for count = 1, updateto:len() do
local l = script:FindFirstChild(text.Name):FindFirstChild(updateto:sub(count, count)):Clone()
l.Parent = text
end
end
local time = 0
local string
while wait(1) do
string = toHMS(time)
updatetext(string,script.Parent.Text)
updatetext(string,script.Parent.Shadow)
time += 1
end
Explorer if yall need that: (the same things in the text folder are in the shadow folder)