I am trying to make it so once you click a button on a GUI, it fades the blur instead of just make it disappear but I don’t know how to do this.
Could someone help me?
I am trying to make it so once you click a button on a GUI, it fades the blur instead of just make it disappear but I don’t know how to do this.
Could someone help me?
I think the code is:
local blur = --The location of the blur
repeat
blur.Size = blur.Size - 0.01
until blur.Size == 0
Please do not hesitate to ask further questions
Hope this helps and good luck!
To do this use TweenService
Example:
local TS = game:GetService("TweenService")
local time = 1
local tweenInfo = TweenInfo.new(time, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false, 0)
TS:Create(game.Lighting.Blur, tweenInfo, {Size = 1}):Play() -- 1 means blur will start showing, to hide use 0
I’ll test it right now. [30 cat]
I didn’t seem to work. I tried setting it to 1 and 0
I would go for the technique i posted, as it is much simpler than @CodeDel 's advanced way of doing this. However, if you are familiar with Tweening then i would try to find the error in the output and attempt to fix it yourself.
Hope this helps! (@CodeDel no controversy intended)
Ok so it did work. It didn’t before as it was getting the blur name incorrect as I have two blurs with different names and it was getting the wrong one. Thanks for your help.