Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I make a buttonclick function that closes all Guis when the button is clicked?

Refer to the title.

Thanks in advance.

1 comment

0

you can put all the Guis inside of ScreenGui and when you press the button, Disable ScreenGui

1 answer

✓ Accepted answer

Hello Spyroxs,

There are two ways to do this

So, I think what you want to do is put all the elements of the GUI inside a frame. And then make the frame's size as (1,0)(1,0)

Then run this:

local button = --Put button path here
local frame = --Put frame path here

button.Clicked:connect(function()
	frame.Visible = false
end)

or

Just disable the ScreenGui

Then run this:

local button = --Put button path here
local gui = --Put gui path here

button.Clicked:connect(function()
	gui.Enabled = false
end)

Thanks, Radio

If this helped you, click the accept answer button, it helps me and you

1 comment

0

:)

This discussion is preserved as it was. New answers, comments, and votes are closed.