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