local frame=script.Parent.Parent.Parent:WaitForChild("Frame") script.Parent.MouseButton1Down:connect(function() frame.Visible=not frame.visible end)
What I am trying to do is that once the players click on the button , it will delete it so it would not show again. For example once they clicked my button the message I have already inserted, it would delete both the button and the Entire GUI. I would like to know where the line would be and what it should contain.
Because your button is script.Parent
, you can simply do
script.Parent:Destroy()
Inside of your input connection