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

How do I make a GUI button that Blurs then if clicked again it removes blur? [closed]

Asked by
iuclds 720 Moderation Voter
4 years ago
script.Parent.MouseButton1Click()
game.Lighting.Blur.Enabled = true
wait()
script.Parent.MouseButton1Click()
game.Lighting.Blur.Enabled = true

I dont know how to script

Closed as Not Constructive by User#6546

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
0
Answered by
tomekcz 174
4 years ago
local isopened = false

script.Parent.MouseButton1Click:Connect(function()
    if not isopened then
        game.Lighting.Blur.Enabled = true
        isopened = true
    else
        game.Lighting.Blur.Enabled = false
        isopened = false
    end
end)

(it needs to be local script)

Ad