[Solved] How are you able to blur the background of a player's screen when they press the "esc" key?

I’m in the process of trying to figure out how to blur a player’s screen when they press the “esc” key. I’m “sort - of” new to scripting, and I don’t have a clue on where to start.

Games like Isolator, and a few others ave been able to pull it off, and it got me thinking if I could do the same thing as well.
https://gyazo.com/80016d6ffe6d923372dcba34edbda60b

A couple of google and searches got me nothing but outdated scripts and tutorials from years ago. If anybody could help explain to me how to achieve this, or link me to a post, that would be awesome.

Thank you, and best of luck!

6 Likes

I think you’d want to use the BlurEffect object:

4 Likes

To add to Thomas’s answer, you’d use a BlurEffect and connect to the events of GuiService, MenuOpened and MenuClosed.

In the video example you provided, they also used a ColorCorrectionEffect and set Saturation down. You’d just add that to the below example if desired.

Example:

--Typed on my phone, sorry if something is wrong

local BlurFX = Instance.new("BlurEffect")
 BlurFX.Size = 0
 BlurFX.Name = "MenuBlur"
 BlurFX.Parent = workspace.CurrentCamera

local GS = game:GetService("GuiService")

GS.MenuOpened:Connect(function()
 BlurFX.Size = 18
end)

GS.MenuClosed:Connect(function()
 BlurFX.Size = 0
end)
22 Likes

Thank you for the additional help! I appreciate it.

1 Like

You could also use the Enabled property over setting a number. Instead of creating two connections, set the Enabled property of the Blur to GuiService.MenuIsOpen using GetPropertyChangedSignal (if it fires, that is, otherwise just ignore what I posted).

3 Likes

I used a number because I was going to tween it but then decided it was too much for sake of the example.

2 Likes