Note: The frame is not the parent of the text button
script.Parent.MouseButton1Down:Connect(function() script.Parent.Parent.Frame.Visible = true end)
I see what you are trying to do, and see no point in not helping out.
01 | local Frame = script.Parent.Parent.Frame |
02 | local OpenButton = script.Parent |
03 | local Open = false |
04 |
05 | OpenButton.MouseButton 1 Click:Connect( function () |
06 | if Open = = false then |
07 | Open = true |
08 | --[[Optional: |
09 | Open.Text = "Close Shop" |
10 | ]] -- |
11 | Frame.Visible = true |
12 | elseif Open = = true then |
13 | Open = false |
14 | --[[Optional: |
15 | Open.Text = "Open Shop" |
16 | ]] -- |
17 | Frame.Visible = false |
18 | end |
19 | end ) |
To further explain the script, it is a open and close script that should be placed in the button, and also make sure that the frame and button are in the correct places.
Hope this helps, Happy scripting!