Setting time doesn't work

So im trying to set the time to 00:10:00 but i keep forgetting how to do it, what did i forget?

local lighting = game:GetService("Lighting")

lighting.TimeOfDay = 00:10:00 --Here is where it's not working
1 Like

It must be in a string. Lua is reading that as a function for 00 currently

Basically this
lighting.TimeOfDay = '00:10:00'

or you can also
lighting:SetMinutesAfterMidnight(600)
Which adds 10 hours after midnight time. It’s just more convenient for me but you choose which one you prefer.

As mentioned by uhi_o the TimeOfDay value is a string.
If you do not want to use the TimeOfDay value (string) you can also use the ClockTime

Meaning

local lighting = game:GetService("Lighting")

lighting.TimeOfDay = "00:10:00"

or

local lighting = game:GetService("Lighting")

lighting.ClockTime = 10