I need help scripting a button

How do I script a gui button so when I click the button “Shop” then the child of shop “Frame” goes visible and when I press the button again it goes invisible?

button.MouseButton1Click:Connect(function()
    frame.Visible = not frame.Visible
end)

This will assign the Visible property of the frame to its opposite every time you click the button.

1 Like