I am working on a script that turns the tick() function into hours and minutes, but the for loop errors:
function isInt(number)
return number == math.floor(number)
end
while true do
wait()
local times = math.floor(tick())
print(times)
for i = 1,tick do
if isInt(i/60) == true then
script.Minute.Value = script.Minute.Value+ 1
end
if isInt(script.Minute.Value/60) then
script.Minute.Value = 0
script.Hour.Value = script.Hour.Value + 1
end
if isInt(script.Hour.Value/24) then
script.Hour.Value = 0
end
end
script.Parent.Text = script.Hour.Value.. " : ".. script.Minute.Value
end
The output goes like this: 18:35:49.863 - Players.Player.PlayerGui.Phone.Main.Bar.Clock.TextLabel.LocalScript:8: 'for' limit must be a number 18:35:49.863 - Stack Begin 18:35:49.864 - Script 'Players.Player.PlayerGui.Phone.Main.Bar.Clock.TextLabel.LocalScript', Line 8 18:35:49.864 - Stack End
Please help me

1 comment
Good answer, and it really helped. but now my problem is: It crashes when I run it. Is there an easier way of getting the time from the timezone?