See, I'm trying to make a time gui with a 12 hour loop. I'm using a textlabel for this and already have a day and night script. I've tried a bunch of different scripts. I feel like this would work, but obviously nothing is.. This is what I have so far.
while true do
script.Parent.Text = string.sub(game.Lighting.TimeOfDay,1,5)
wait()
if Lighting.TimeOfDay >= 13 then
script.Parent.Text = Lighting.TimeOfDay - 12
elseif Lighting.TimeOfDay <= 12 then
script.Parent.Text = string.sub(game.Lighting.TimeOfDay,1,5)
wait()
end
Help would very much be appreciated

5 comments
Actually he can use TimeOfDay and just convert the string to a number
thx made edit.
Thank you so much! It works, but one tiny issue. Instead if 10s, I want it to go by ones, if possible. Thank you!
sure. change minutesPassed to 1 instead of 10 and it'll make 10 minutes pass evey 0.1 seconds. if you want time to change slower, change changeTimeIncrement to a bigger number.
I know I'm very late, but it still doesn't work properly. Let's say it's 7:00 p.m. It'd do 7:10, :20, :30, :40, etc all the way to 7:90. Then it'd go by 1s.