I’d like to have a blur that covers the camera when I open my GUI but I don’t want it to cover the GUI as well.
Example:
Instead of this
I want this
But like… blurry.
Sorry if this doesn’t make any sense.
I’d like to have a blur that covers the camera when I open my GUI but I don’t want it to cover the GUI as well.
Example:
Instead of this
I want this
But like… blurry.
Sorry if this doesn’t make any sense.
So turn on Blur or your lighting stuff in lighting that makes it blur then add a local script to the gui button saying
script.Parent.Mousebutton1Click:Connect(function()
game.Lighting.YourBlurHere.Enabled = false
end
so I place the blur in lighting and the localscript into my menu frame right?
because when i did that it just permanently blurred my screen
Not in the FRAME put it in the Gui BUTTON
correct?
i suck at roblox development sorry for not understanding
Blurring UI’s isn’t a feature on roblox at this current moment,
The only way to blur UI’s is to program it yourself.
There are already free resources on how to do this, and which provide.
Here is one I can link you to: BlurUI - Blur Your UIs! [VERSION 1.1]
If you’re talking about blurring the background, just add Blur to Lighting.
The script provided should be in a localscript within your UI.
local NewBlur = Instance.new('BlurEffect', game.Lighting) -- Creates a new BlurEffect in Lighting
NewBlur.Size = 25 -- Specify how much blur you want
-- To delete the BlurEffect
NewBlur:Destroy()
thanks, although im not quite sure how im supposed to use the script
i created a blur, inserted the script into my ui, but nothing happened
the background just stayed blurred
The script already creates a blur for you, Therfor you do not need to put a blur in lighting yet.
As well, it deletes the Blur the second its created, it’s best you yield it before it deletes.
local NewBlur = Instance.new('BlurEffect', game.Lighting) -- Creates a new BlurEffect in Lighting
NewBlur.Size = 25 -- Specify how much blur you want
--[[ Do your script stuff in between here. --]]
wait(5) -- Yields/Waits 5 seconds.
-- Deletes blur effect.
NewBlur:Destroy()
It’s not necessarily a feature inside of ROBLOX unfortunately but there’s alternative ways to get the same style such as using the blur effect and having it get deleted once a button is pressed.
Yeah my old developer had it for the game but the script doesn’t work.
Okay, so find lighting in your workspace and find blur, add that in, then a script that says something like “when script.Parent.MouseButton1Click.Police (or criminal) then blur 0”
Something like that.
I haven’t scripted in years-
oh and, you should probably put it in the police gui button and/or the criminal sorry if this didnt help
thats what i was thinking
thing is, im horrible at scripting
Same… because I haven’t done it in years-
Simply add a Blur
object into the Lighting folder of your game. If you wish to remove the blur, change it’s Size
property with a script:
GUIButton.MouseButton1Click:Connect(function()
game.Lighting.Blur.Size = 0
end)
Put this in scripting support.
LocalScript inside the gui button:
local lighting = game.Lighting
local button = script.Parent
button.MouseButton1Click:Connect(function()
local blur = Instance.new("Blur")
blur.Parent = lighting
blue.Size = 10
end)
To remove the blur set the size to 0 on line 6.
@RoPoliceDev try this
make sure the blur is in lighting and replace YourBlurHere with your blur in lighting it must be a blur effect and put this as a local script In your Gui Button.
script.Parent.Mousebutton1Click:Connect(function()
game.Lighting.YourBlurHere:Destroy
end
just adding onto this real quick, that code won’t work, but this should:
script.Parent.Mousebutton1Click:Connect(function()
game.Lighting.YourBlurHere:Destroy()
end