✓ Accepted answer
Lighting.TimeOfDay returns a string value (would look something like "12:00:00"), and os.time() returns an integer of "... how many seconds have elapsed since the UNIX epoch (1 January 1970, 00:00:00), under UTC time."
So, instead, I would suggest using Lighting.ClockTime (returns a numerical value in hours of current game time) and os.date() (click the link)
Your script could look something like:
while wait() do
game.Lighting.ClockTime = os.date("*t").hour
end
Note: The above code would set the time according to the player's local time.
1 comment
You didn't specify the problem.