Example: Print "Hello World" when is 7pm or more in the game
(I hope you understand, English is not my native language)
Example: Print "Hello World" when is 7pm or more in the game
(I hope you understand, English is not my native language)
This is the thing with Lighting.TimeOfDay.
It doesn’t change unless you tell it to.
game:GetService("Lighting").TimeOfDay = 5
If you have a day/night script and the TimeOfDay reaches the desired time (7) then it'll print.
if game.Lighting.ClockTime == 7 then
print("Hello world")
end
This should work.
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
I'd use this to accomplish that: http://wiki.roblox.com/index.php?title=API:Class/Lighting/ClockTime
^ To add on, if you'd prefer to use TimeOfDay, then I would take the first numbers, then compare them. (For example, I would do TimeOfDay:sub(1, 2) == '07')