I've been trying for over a week to make an open and close button for Frame, ScrollingFrame, and TextLabel to make a store on my map if anyone knows please tell me
i trying this code but dont work on the TextButton with the LocalSript
local Button = script.Parent
Frame = script.Parent.Parent.Menu
function onClick()
if Frame.Visible == false then
Frame.Visible = true
elseif Frame.Visible == true then
Frame.Visible = false
end
end
Button.MouseButton1Click:connect(onClick)

5 comments
Are there any errors in the output? Also, indent your code; this can do it for you: https://www.roblox.com/library/592898457/Script-indenter
Use :Connect() and im pretty sure functions need "end)
Use :Connect() and im pretty sure functions need "end)"
Btw, use :Connect instead of :connect, it's deprecated.
That script should work. I'd recommend making sure your Button and Frame variables are defined correctly.