How to toggle lights only when it's night?

How do i make lights only turn on when it gets night?
sorry if this was answered before but couldnt find it on this site


There’s a tutorial on the Wiki for setting up a basic Day/Night Cycle here:

Towards the end, it even gives you an example when to check for Night. You could use this to toggle the Visibility of lights similar to below I suppose.

Kudos to the guys who put up the posts and video on the Day/Night cycle.



ive added your stuff in between it , first it stopped my light from rotating so i changed the delta seconds, now it works but the light is always off?

i just noticed, its on until the first night? then it goes out and doesnt go on anymore?