I am trying to turn my street lights on and off when it hits a certain time. I want them to turn on at 180000 and off at 6.65 there are no errors. It just doesn't work at all.
Script:
local onLight = script.Parent.StreetLightTimer.Lampstick.Lightpart.onLight
local offLight = script.Parent.StreetLightTimer.Lampstick.Lightingpart.offLight
while wait() do
if game.Lighting.ClockTime == 180000 then
onLight.Enabled = true
offLight.Enabled = true
if game.Lighting.ClockTime == 6.65 then
onLight.Enabled = false
offLight.Enabled = false
end
end
end

1 comment
Thank you so much I did not know loops don't work for this