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

How can I script for a GUI menu that will open and close?

I am trying to make a script for a menu that will show 4 more buttons by clicking on the "Class Setup" button but keeping that button visible and by having that same button close it. I have tried several types of codes but I'm not sure why it won't work as I expect it to. I am starting from scratch again on the script but I wanted to know if anyone could tell me what code I can use to get these results.

1 answer

✓ Accepted answer
script.Parent.MouseButton1Click:connect(function()
	local a = -- the frame   script.Parent.Parent.Frame2   -- two different frames must be needed
	a.Visible = not a.Visible
end)

thank you for using, in a screen gui it makes a frame called Frame2 visible and invisible when you click on it remember to keep this script in the first frame inside a text button

~greatneil80

5 comments

0

by the way you can put more buttons inside frame2

0

Should I use a Script or a Local Script? Also, how do I add the two different frames?

0

@ZoliumCarboxynol: always use LocalScripts when working with guis, since guis are only for clients (the players), not the server.

0

I agree with chess123mate

0

I agree with chess123mate

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