Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why wont this print? I have no console errors and I haven't noticed anything wrong

Asked by 3 years ago

I have a script that sets the time to 19, and it works, but then this doesn't go through?

if game.Lighting.TimeOfDay == 19 then 
   print("19")
end

1 answer

Log in to vote
0
Answered by 3 years ago

TimeOfDay is written in 24 hour time format so you would have to do:

if game.Lighting.TimeOfDay == 19..":"..00..":"..00 then

Alternatively you can just use ClockTime which converts 24 hour time to hours.

if game.Lighting.ClockTime = 19 then
0
Thank you!! Ill be using clocktime from now on goblinc0re 1 — 3y
Ad

Answer this question