Hello, I'm a beginner scripter on ROBLOX!
I need help with something I've trying a few days ago. When you press the key "ESC" (or escape) on your keyboard it blur the background of your game.
And the same if you close the "ESC" (or escape) menu, it remove the blur of the game with the element "BlurEffect".
local GuiService = game:GetService("GuiService") GuiService.MenuOpened(function() print("Menu opened") game.Lighting.Blur.Enabled = true end) GuiService.MenuOpened(function() print("Menu closed") game.Lighting.Blur.Enabled = false end)
When I try this code, it doesn't work.
I read those, I don't found a example for them: http://wiki.roblox.com/index.php?title=API:Class/GuiService/MenuOpened http://wiki.roblox.com/index.php?title=API:Class/GuiService/MenuClosed
And: http://wiki.roblox.com/index.php?title=API:Class/GuiService
Hi...?
Assuming you’re using a localscript since you have to anyways, you could try to put the BlurEffect in the camera in Workspace instead. The blur will still show if you do that and it’ll let you do it locally (Only the player that opened menu will see it). Then just edit your code to toggle the blur in the camera.
Oh wait, there are also some minor problems with your script so here’s a fixed version :
local GuiService = game:GetService("GuiService") GuiService.MenuOpened:Connect(function() print("Menu opened") game.Workspace.Camera.Blur.Enabled = true end) GuiService.MenuOpened:Connect(function() print("Menu closed") game.Workspace.Camera.Blur.Enabled = false end)
You forgot to add :Connect on the functions, and I changed the script so it’ll toggle the blur in the camera instead. Also make sure the blur is named “Blur”.
Hoped this helped!
Also users like you still exist? I thought Scripting Helpers removed them or something.