Hey! I need help with a script. I want to make the background blur when you open the GUI and I’ve achieved that by making it insert the BlurEffect into lighting. However, when you click the button multiple times, it puts multiple blur’s into lighting. This makes it so the close button doesn’t delete the blur. Any ideas on what I could do/change to make them all get deleted? Open Button:
You could make it so that when you close the buttons, just use for loops to iterate and delete all those blur effect instances. You could also do an if statement to check if a blur instance is already added.
In the BlurEffect object, isn’t there a property called Enabled? So when you open the GUI, you can just set the Enabled property to true, and when you close to GUI, set the Enabled property to false. You can default to false in the beginning.