Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

GUI Not going away?

function OnClicked()
	script.Parent.Parent.Visible = false
end

script.Parent.MouseButton1Down:connect()

Wont take the GUI away...

1 comment

0

10/10

2 answers

✓ Accepted answer

Hi This is a simple fix... you have not finished your line 5..What is it connecting to?

script.Parent.MouseButton1Down:connect(onClicked)

Also in line 2 uncapitalize the on in onClicked.

You are not connecting the function 'OnClicked' to the event MouseButton1Down. Change it to:

function OnClicked()
    script.Parent.Parent.Visible = false
end

script.Parent.MouseButton1Down:connect(OnClicked)

This discussion is preserved as it was. New answers, comments, and votes are closed.