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.
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.
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)
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).