Making blur slowly delete

So I had a guy tell me that to make your blur ‘fade’ you could use this script:

for i = 1,Size of it then
Game.Lighting.Blur.Size = Game.Lighting.Blur.Size -1
wait(.01)
end

It did not work, so I am here to ask 2 questions:
Why did that not work?
How would I make the blur ‘fade’?

edit: ‘Size of it’ is just what he put there, I edited it to 24 (The size) so that is not the issue.

1 Like

for i = 1, 50 then
game.Lighting.Blur.Size = Game.Lighting.Blur.Size -1
wait(.01)
end

1 Like

I think that should have worked but a fixed version:

for blurBye = 1, 24 do -- change blur size with 24
	game.Lighting.Blur.Size = game.Lighting.Blur.Size - 1
	wait(0.2) -- do not change this, this one is perfect
end

wait(0.2) gives a better fade animation

1 Like

Do

for i = 1, *Insert blur size here* then
    game.Lighting.Blur.Size = Game.Lighting.Blur.Size - .1
    wait(.01)
end
game.Lighting.Blur.Size = 0

and that should work.

I’m pretty sure yours didn’t work because you didn’t tell it when it should stop, and by putting “game.Lighting.Blur.Size = 0” after it will tell it so stop when it gets to that point.
Remember to put in the size of your blur amount in the “Insert blur size here” bit.

1 Like

Thanks to all! All of your scripts work but I just chose the one that made most sense,

How would I make it so during the blur you cannot move then after the blur you can?

Set the player’s walkspeed to 0 until the blur ends. Once the blur ends, make walkspeed to whatever you want.

1 Like

So like how would I reach the walkspeed? Game.Players.Localplayer.Humanoid.Walkspeed?

No the best way would be in a local script doing

local Plr = game.Players.LocalPlayer
local Char = Plr.Character

Char.Humanoid.WalkSpeed = 0 

and then after the blur is over set it back to the default walkspeed.

1 Like

07:08:52.953 - Humanoid is not a valid member of Model

The best way to do this is with TweenService,
heres a small snipet of that the code would be

TweenService:Create(game.Lighting
.Blur, TweenInfo.new(1), {Size=0}):Play()

It is the smoothest way of doing it and it doesn’t yeild your script.

1 Like