I attached both a video and the close/open GUI, as well as the entire gui contents in a screenshot. It's a little jumbled, but I spent an hour tweaking it and it would be great if there's a fix. Thanks!
1) In the close/open script:
script.Parent.MouseButton1Click:connect(function() mainShop = script.Parent.Parent.MainShop if mainShop.Visible == false then mainshop.Visible = true script.Parent.Text = "Close" else mainShop.Visible = false script.Parent.Text = "Open" end end)
2) Screencapture of the contents of the GUI:
https://gyazo.com/191edb0518b3b7a5c491851f5889fe95
3) Video of what happens:
https://youtu.be/jaZ4jIaughc
If anyone can figure this out, it'd mean a lot. Thanks!
You forgot to capitalize the S 'mainShop' on line 4.
Corrected code should look like this:
script.Parent.MouseButton1Click:connect(function() mainShop = script.Parent.Parent.MainShop if mainShop.Visible == false then mainShop.Visible = true script.Parent.Text = "Close" else mainShop.Visible = false script.Parent.Text = "Open" end end)