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

Tinker With Blur by using a script?

How can like, when I touch a part, the blur rises then decreases.

Blur = Instance.New("BlurEffect")

Help?

1 answer

✓ Accepted answer

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!

5 comments

0

Wait...where does the script go?

0

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!

0

Thank you! I've learned how to make it faster, and everything!! Now this will be good for my game :3

0

Np :)

0

:P

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