The script is meant to lower the Saturation to -1, then when it hits -1 it is meant to stop. However, it continues to lower the saturation, and does not stop.
How can I make it stop at -1?
01 | local C = game.Lighting.ColorCorrection |
02 |
03 | script.Parent.DiseaseValues.Cure 1. Colourblind.Value = false |
04 | script.Parent.DiseaseValues.DiseaseTotal.Counter.Value = 1 |
05 |
06 | i = 0.5 |
07 | while true do |
08 | i = i - 0.1 |
09 | wait( 1 ) |
10 | C.Saturation = i |
11 | if i = = - 1 then |
12 | break |
13 | end |
14 | end |
1 | for i = 0.5 ,- 1 , -. 1 do |
2 | wait( 1 ) |
3 | C.Saturation = i |
4 | end |
Fixed