I know how to make the Gui toggle from visible to not visible using TWO buttons, but I can't figure out how to do the same thing using only ONE button. Here is how to do it using two buttons:
Visible button:
function onClick() Gui = game.StarterGui.ChatGui.Frame.TextBox Gui.Visible = true end script.Parent.MouseButton1Down:connect(onClick)
Not visible button:
function onClick() Gui = game.StarterGui.ChatGui.Frame.TextBox Gui.Visible = false end script.Parent.MouseButton1Down:connect(onClick)
Can anyone show me how to make this into ONE toggle button?
easy :p
function onClick() Gui = game.StarterGui.ChatGui.Frame.TextBox if Gui.Visible == false then Gui.Visible = true else Gui.Visible = true end end script.Parent.MouseButton1Down:connect(onClick)