For some reason, my script only runs once while using while true do (with a wait() after the while) but it runs forever when using while wait() do. I thought they were the same thing?
while true do
while true do
wait()
if game.Lighting:GetMinutesAfterMidnight() == 18 * 60 then
script.Parent.Material = Enum.Material.Neon
script.Parent.PointLight.Enabled = true
end
if game.Lighting:GetMinutesAfterMidnight() == 6 * 60 then
script.Parent.Material = Enum.Material.Plastic
script.Parent.PointLight.Enabled = false
end
end
while wait() do
while wait() do
if game.Lighting:GetMinutesAfterMidnight() == 18 * 60 then
script.Parent.Material = Enum.Material.Neon
script.Parent.PointLight.Enabled = true
end
if game.Lighting:GetMinutesAfterMidnight() == 6 * 60 then
script.Parent.Material = Enum.Material.Plastic
script.Parent.PointLight.Enabled = false
end
end

4 comments
Be careful when using == with numbers that specifc. It could cause problems and never trigger if it doesn't check at the exact right moment. I'd recommend using an elseif and switching the order of the conditions (the numbers) and using < instead of ==. That just might fix your problem, but is much better code even if it doesn't.
How are you setting the time?
I made a Day/Night cycle script and it works so I know it's not coming from that
Why does while wait() do allow me to not use elseif and it still turns on and off but while true do requires me to use elseif on the second if statement :|