Basically the Timer counts down from 10 minutes and then goes to night and vise versa. Yet once it hits 00:00 it goes to 10:00 as its supposed to but that's it. Does not change the lighting or anything and doesn't even continue to count down after it just stays there.
local lighting = game:GetService("Lighting")
local min = script.Minutes
local sec = script.Seconds
local night = script.Night
while true do
wait(1)
if sec.Value == 0 then
if min.Value == 0 then
if night == false then
lighting.Brightness = 0
lighting.OutdoorAmbient = Color3.fromRGB(93, 93, 93)
lighting.TimeOfDay = "22:00:00"
night = true
min.Value = 10
else
lighting.Brightness = 1
lighting.OutdoorAmbient = Color3.fromRGB(127, 127, 127)
lighting.TimeOfDay = "14:00:00"
night = false
min.Value = 10
end
break
else
min.Value = min.Value - 1
end
sec.Value = 59
else
sec.Value = sec.Value - 1
end
end
It's not a hard script I don't know why its not working any help is appreciated.

1 comment
you break out of the loop on line 23?