Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to achieve a fading a blur without while true do?

Asked by 7 years ago

So far, I can achieve a blue that fades softly with while true do:

    while true do
        wait()
        game.Lighting.Blur.Size = game.Lighting.Blur.Size + 1
    end

That get's the effect I want, but it keeps increasing the Size value and creates lag and I can't get it to stop at a certain number I also tried doing repeat until, that doesn't work. It does not have a fading effect I want. Does anyone know a method?

0
What is your target blur size? At what point do you want the script to stop telling it to increase. Goulstem 8144 — 7y
0
24, the preset one. hermosavida 6 — 7y

1 answer

Log in to vote
0
Answered by
Valatos 166
7 years ago
Edited 7 years ago
for i = 1, 24 do
    wait()
    game.Lighting.Blur.Size = game.Lighting.Blur.Size + 1
end

A for loop works actually the same as a while true do it also doesn't crash when you don't yield, except this only repeats a certain time, in this case, 24 times

Ad

Answer this question