Renaming Objects and Changing Script Accordingly | GUI

I followed a youtubers guide on how to make a gui pop up on click of an on screen button but when I change the name of the things to lets say from “Frame” to “Shop1” the script just doesn’t work and I’m new so I don’t know what things I would have to replace in order to make it work again
heres the names as the original
image
heres the names after changing
image
Heres the scripts:

script.Parent.MouseButton1Click:Connect(function()

script.Parent.Parent.Frame.Visible = true

end)

Another script:

script.Parent.MouseButton1Click:Connect(function()

script.Parent.Parent.Visible = false

end)

Please help.

change the first script to

script.Parent.MouseButton1Click:Connect(function()

      script.Parent.Parent.Shop1.Visible = true

end)
1 Like