Close button GUI not working

Hi so my close button Gui is not working

script.Parent.MouseButton1Click:Connect(function()
	script.Parent.Parent.Visible = false
end)

is there a problem with the script

Is there any errors?

Also, please send a picture of your explorer.

1 Like

i created a gui which appers when you touch the part but i am unable to close it

i got no pics now sorry

1 Like

You reference something wrong.

Try this:

script.Parent.MouseButton1Down:Connect(function()
    print('Clicked!')
	script.Parent.Parent.Visible = false
end)
2 Likes

ok I will let you know. thx a lot

2 Likes