Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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?

2 comments

0

What is your target blur size? At what point do you want the script to stop telling it to increase.

0

24, the preset one.

1 answer

✓ Accepted answer
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

This discussion is preserved as it was. New answers, comments, and votes are closed.