This script is supposed to make a GUI visible is it is not, or invisible if it is. It is a normal script inside a frame, inside a TextButton, inside a ScreenG UI inside the Starter GUI.
local button = script.Parent.Parent
local frame = script.Parent
function onMouseButton1Down()
--Hide the entire frame, don't remove it!
if frame.Visible == false then
frame.Visible = true
if frame.Visible == true then
frame.Visible = false
end
end
end
button.MouseButton1Down:connect(onMouseButton1Down)
Would it be better to make it elseif instead of he second if? Please include code in your answer. Thanks.

1 comment
Thanks for the clarification, I have upvoted you.