How to blur UI on Click

How can I blur UI on a click of a button and then unblur after 5 seconds?

insert a BlurEffect in Lighting and disable it/enable it accordingly

Add a localscript in the button you’re using, and just copy-paste this:

local BlurEffect = Instance.new("BlurEffect")
BlurEffect.Name = "UIBLur"
BlurEffect.Parent = game.Lighting
BlurEffect.Size = 0
script.Parent.MouseButton1Down:Connect(function()
BlurEffect.Size = 30
wait(5)
BlurEffect.Size = 0

If you want smooth blur, use a tween.

do something like
(make a blur effect in lighting first and customize it to your likings)

local button = script.parent
local blur = game.lighting.blur

button.mousebutton1click:connect(function()
blur.enabled = true
wait(5)
blur.enabled = false
end)