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 GUI do 2 things?

I want to make a GUI open a Help GUI., and if it is clicked again to close it. I don't know how to do the second part.

1 answer

✓ Accepted answer

This piece of code stores a boolean value of whether the Help GUI is open or not. When the button is clicked, it checks whether it is open or closed then changes the visibility accordingly:

local open = false
local gui = TextButton -- Change this to the location of your open/close button
local help = Frame -- Change this to the location of your help menu

gui.MouseButton1Click:connect(function()
	if open == true then
		help.Visible = false
		open = false
	elseif open == false then
		help.Visible = true
		open = true
	end
end)

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