(This is the first time I’ve ever scripted something for a GUi, keep that in mind.)
I’m trying to make a TextButton that makes a frame popup when clicked, and have it disappear if clicked again, how do I do this?
In my current script, I inserted this LocalScript inside the TextButton. (I also apologize if this code block looks horrendous, I’m trying to get used to this new editor.)
1 | menuopen = game.StarterGui.TPStuff.FullMenu.Visible |
2 | thegui = game.StarterGui.TPStuff |
3 | script.Parent.Mouse 1 Click:connect( function () |
4 | if menuopen = = false then |
5 | thegui.FullMenu.Visible = true |
6 | elseif menuopen = = true then |
7 | thegui.FullMenu.Visible = false |