How can like, when I touch a part, the blur rises then decreases.
Blur = Instance.New("BlurEffect")
Help?
How can like, when I touch a part, the blur rises then decreases.
Blur = Instance.New("BlurEffect")
Help?
You could use tweenservice but it would be better if you use repeat
local Part = script.Parent -- put the script under a parent
local Blur = game:GetService('Lighting'):WaitForChild('BlurEffect') -- So put the blur inside lighting
Debounce = true
function Fade()
repeat
wait(0.01)
Blur.Size = Blur.Size + 0.1
until Blur.Size >= 50
wait(2)
repeat
wait(0.01)
Blur.Size = Blur.Size - 0.1
until Blur.Size <= 0
end
Part.Touched:connect(function(hit)
if Debounce then
Debounce = false
if hit.Parent:FindFirstChild('Humanoid') then
Fade()
end
Debounce = true
end
end)
If you have any questions about this script please ask me, if you want it so the blur is client only you should connect it to an event, good luck!
This discussion is preserved as it was. New answers, comments, and votes are closed.
5 comments
Wait...where does the script go?
Inside the part where you want it to blur (part needs to be inside workspace), don't forget to add a Blur inside Lighting called BlurEffect!
Thank you! I've learned how to make it faster, and everything!! Now this will be good for my game :3
Np :)
:P