Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How would I add this into my local script?

Asked by 8 years ago
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.

0
If you dont understand please tell me... iiAstroApple 30 — 8y
0
Cali, in what line would I place this? iiAstroApple 30 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

Because your button is script.Parent, you can simply do

script.Parent:Destroy()

Inside of your input connection

Ad

Answer this question