Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do i Disable a blur with a seperate script?

Asked by 5 years ago

Ok so, how do i disable a blur(in the Workspace Camera) with a seperate script, one that opens the GUI and makes the BlurEffect, and the other i tried doing

local button = script.Parent.XButton

button.MouseButton1Click:connect(function()
    script.Parent.Parent.Parent.Parent.Workspace.Camera.blur.Enabled = false

and the other one(Which opens the gui)

local button = script.Parent.OpenButton
local size = 50
local blur = Instance.new("BlurEffect")



button.MouseButton1Click:connect(function()
 script.Parent.Parent.Main.Visible = true
    script.Parent.Visible = false
    blur.Enabled = true
    blur.Size = size
    blur.Parent = workspace.CurrentCamera
end)

What seems to be the Problem here?

and also

    script.Parent.Parent.Parent.Parent.Workspace.Camera.blur.Enabled = false

i tried doing it and it didn't work in the Output it says

19:46:36.520 - Workspace is not a valid member of Player 19:46:36.521 - Stack Begin 19:46:36.521 - Script 'Players.TheUgliestAlt.PlayerGui.ScreenGui.Main.LocalScript', Line 8 19:46:36.522 - Stack End

I'm trying to make a GUI for my friend that he wanted me to make to show proof that i was a decent/good scripter(Just started scripting like a month ago i think)

0
instead of script.Parent.Parent.Parent.Parent.Workspace, why not just workspace?? Gey4Jesus69 2705 — 5y

Answer this question