I don’t know how to make an open and close gui button and I have my Frame ready in.
Here, my script doesn’t work:
local Btn = script.Parent
local frame = script.Parent.Parent.Frame
Btn.MouseButton1Click:Connect(function()
frame.Visible = true
else
frame.Visible = false
end)

4 comments
Thank you so much! Appreciate that!
Hi! This is a good answer, however, usually GuiButton.Activated is better than GuiButton.MouseButton1Click. Would you mind including that in your answer? Thanks
Ok sure
@TTChaos Hi, the behavior of Activated and MouseButton1Click is different not only because MouseButton1Click doesn't work on some devices, but also because MouseButton1Click requires the mouse button to be released on the GUI button. I'm not sure if the asker intends on implementing that behavior, but I will add it as a disclaimer.