function OnClicked() script.Parent.Parent.Visible = false end script.Parent.MouseButton1Down:connect()
I cant get it to go away :C
You have not connected the event to the function so to do this it can be achieved 1 of 2 ways. first you could use an anonymous function which would look something like this
script.Parent.MouseButton1Down:connect(function() script.Parent.Parent.Visible = false end)
or you could do it the way that you are trying to accomplish which would look like this
function onClick() script.Parent.Parent.Visible = false end script.Parent.MouseButton1Down:connect(onClick)
if this doesnt work then check to make sure that you are referencing the correct things because that could be the issue and i hope that this helped
buttonNameHere.MouseButton1Down:connect(function() NameOFGuiToMakeInvisible.Visible = false end)
That should work