local function getTime()
local date = os.date("*t")
return ("%02d:%02d"):format(((date.hour % 24) - 1) % 12 + 1, date.min)
end
local lightningTime = game.Lighting.TimeOfDay
while wait(1) do
print(getTime())
lightningTime = getTime()
end
This only prints 12hr format i need to be 24hr format cause time of day is 00:00:00 like this any way to format it like this thank you!
local function getTime()
local date = os.date("*t")
return ("%02d:%02d:%02d"):format(date.hour, date.min, date.sec)
end
local lightningTime = game.Lighting.TimeOfDay
while wait(1) do
print(getTime())
lightningTime = getTime()
end
It doesn’t change the time?
The time is formatted like this: 20:39:05
local function getTime()
local date = os.date("*t")
return ("%02d:%02d:%02d"):format(date.hour, date.min, date.sec)
end
while wait(1) do
print(getTime())
game:GetService("Lighting").TimeOfDay = getTime()
end
Basically just remove the variable lightingTime and replace it with the line I added mb*