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

Smart lighting system i made not working for lights, how do i fix?

Asked by
Hafrew 16
3 years ago

So basically what im trying to do is make a lighting system that only turns on after the lighting clock time "8", and turn off after clock time "18". Here is my script.

while true do
    wait(0.1)
    if game.Lighting.ClockTime == 8 or 9 or 10 or 11 or 12 or 13 or 14 or 15 or 16 or 17 then
        script.Parent.Enabled=false
    end
    if game.Lighting.ClockTime == 18 or 19 or 20 or 21 or 22 or 23 or 0 or 1 or 2 or 3 or 4 or 5 or 6 or 7 then
        script.Parent.Elabled=true
    end
end

The script only seems to turn the lights off completely and it does not go on, even if i set the time to something like 2 or 5.

Answer this question