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

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

Asked by 6 years ago

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

Log in to vote
0
Answered by 6 years ago
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

0
by the way you can put more buttons inside frame2 greatneil80 2647 — 6y
0
Should I use a Script or a Local Script? Also, how do I add the two different frames? ZoliumCarboxynol 2 — 6y
0
@ZoliumCarboxynol: always use LocalScripts when working with guis, since guis are only for clients (the players), not the server. chess123mate 5873 — 6y
0
I agree with chess123mate greatneil80 2647 — 6y
0
I agree with chess123mate greatneil80 2647 — 6y
Ad

Answer this question