|
| 12 Nov 2011 12:21 PM |
This is the script(it's meant for a GUI):
function onClicked(GUI) h = script.Parent.Parent.Parent.Parent.Parent.Character:findFirstChild("Humanoid") if (h ~= nil) then script.Parent.Parent.Parent.Frame.Visible = true else return end end script.Parent.MouseButton1Click:connect(onClicked)
This currently will open my instruction GUI onClick, but how to make it close if you click the GUI again?
I tried 2 lines together, one with 'true' other with 'false' statement.
HELP |
|
|
| Report Abuse |
|
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
|
| 12 Nov 2011 12:22 PM |
| You a gui to be clicked two times to make a print? |
|
|
| Report Abuse |
|
|
| |
|
sharky99
|
  |
| Joined: 18 Dec 2008 |
| Total Posts: 3364 |
|
| |
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
| |
|
Apocalyps
|
  |
| Joined: 15 Feb 2009 |
| Total Posts: 816 |
|
|
| 12 Nov 2011 12:34 PM |
function onClicked(GUI) h = script.Parent.Parent.Parent.Parent.Parent.Character:findFirstChild("Humanoid") if (h ~= nil) then script.Parent.Parent.Parent.Frame.Visible = not script.Parent.Parent.Parent.Frame.Visible end end script.Parent.MouseButton1Click:connect(onClicked) |
|
|
| Report Abuse |
|
|
Miro034
|
  |
| Joined: 07 Oct 2009 |
| Total Posts: 6568 |
|
|
| 12 Nov 2011 12:36 PM |
| OMG Apocalyps is back from the scripting helpers :D |
|
|
| Report Abuse |
|
|
|
| 12 Nov 2011 12:38 PM |
| Thank you so much Apocalyps! |
|
|
| Report Abuse |
|
|