Hi
I'm trying to create a light that follows the game lighting. So the lights will switch on at a certain time and switch off at a certain time as well.
I tried it out but failed. Can someone help me out?
-- Variables -
light = script.Parent.SurfaceLight
-- Main --
wait()
while true do
if ("18:00:00" <= game.Lighting.TimeOfDay <= "06:00:00") then
light.Enabled = false
else
light.Enabled = true
end
end
