I've been trying to make a stopwatch for an obby game of mine, which times you as you complete it. When the stopwatch reaches 10 however, it breaks and say "00:010" instead of "00:10" like its suppose to. If anyone could help, that would be great.
Its inside a local script with its parent being a textlabel.
local startmin = 0
local startsec = 0
local text = script.Parent
local min = 0
local sec = 0
while true do
startsec = startsec + 1
print("Added 1 sec")
if startsec == 60 then
startsec = 0
startmin = 1
end
if sec > 9 then
local mess = "0" .. startmin .. ":" .. startsec
text.Text = mess
else
local mess = "0" .. startmin .. ":0" .. startsec
text.Text = mess
end
wait(1)
end

2 comments
short answer: no it does not print 00:010.
utilize string formatting