Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

I've made a close button for my Shop GUI but it isn't working, how to fix?

Asked by 3 years ago
Edited 3 years ago

I've made a close button script and when I click the button on the shop gui nothing happens.

            script.Parent.MouseButton1Click:Connect(function()                                                                                                      

         script.Parent.Parent.Visible = false

   end)

Is there something wrong with my script?

0
Is it a Script or a LocalScript MarkedTomato 810 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

try removing one of the parents from

 script.Parent.Parent.Visible = false 

and placing this

local btn = script.Parent

btn.MouseButton1Click:Connect(function()
    print('clicked') --change this accordingly

into a script inside of the button

0
I hate to be that person, but I'm confused what I'm removing and placing DirtyRaskel20 0 — 3y
0
ill clear up the instructions destroyermagical13 2 — 3y
Ad

Answer this question