Open and close Gui is not working

Are those lines of code inside of a LocalScript directly inside of the button that is being referenced by script.Parent? If you put the LocalScript into the frame, that function cannot be activated via MouseButton1Click.

1 Like

I found the problem. Try changing the text button to a image label and remove the image displayed, or you can do

script.Parent.add_shopping_cart.MouseButton1Click:Connect(function()
    --code
end)
2 Likes

Yes, they are placed inside the text button that you click to turn visibilty on and off

1 Like

If that doesn’t work substitute the add_shopping_cart for TextButton_Roundify_12px

2 Likes

You fixed it! Thanks, I can’t believe that was the problem! Thanks mate.

2 Likes

Its a ZIndex problem, the imagebutton has higher ZIndex so it would process the button click instead of the textlabel

2 Likes