I'm making a Runway Lighting system for my airport, but apparently the script I made is not working properly for any sort of reason. I got 2 scripts, one for the day/night cycle (which works), and the other to turn off the light once 6AM has hit, and it should turn back on once 6PM has hit. But it doesn't, so any help would be appreciated.
Day/Night Cycle Script
minutesAfterMidnight = 0
while true do
minutesAfterMidnight = minutesAfterMidnight + 10
game.Lighting:SetMinutesAfterMidnight(minutesAfterMidnight)
wait(.1)
end
Runway Lighting Script
while true do
if game.Lighting.ClockTime > 6
script.Parent.Light.Enabled = false
script.Parent.Material = "Smoothplastic"
end
if game.Lightning.ClockTime > 18
script.Parent.Light.Enabled = true
script.Parent.Material = "Neon"
end
end

1 comment
Small note for the Day/Night Cycle: I made it +10 for fast forwarding a bit to see if the Runway Lighting script works. Hence why it's so high.