18robot18
|
  |
| Joined: 01 Feb 2009 |
| Total Posts: 118 |
|
|
| 25 Mar 2014 03:00 PM |
So, I am trying to make this Gui and I have it working so far so now I am making a button that closes and opens it all, here is what I have so far:
function hi() script.Parent.Parent.TextButton.Visible = false end
script.Parent.MouseButton1Down:connect(hi)
I don't know if this would mess up the script but could I do this?:
function hi() script.Parent.Parent.TextButton1.TextButton2.Visible = false end
script.Parent.MouseButton1Down:connect(hi)
or would I have to put each in their own script inside of the TextButton? |
|
|
| Report Abuse |
|
|
YumERAGON
|
  |
| Joined: 18 Apr 2012 |
| Total Posts: 3893 |
|
|
| 25 Mar 2014 03:04 PM |
open = true
script.Parent.MouseButton1Down:connect(function() if open then blah.blah.Visible = false open = false elseif not open then blah.blah.Visible = true open = true end end) |
|
|
| Report Abuse |
|
|
|
| 25 Mar 2014 03:06 PM |
script.Parent.MouseButton1Down:connect(function() blah.blah.Visible = not open open = not open --This statement must be second, I think you can figure out why end) |
|
|
| Report Abuse |
|
|
YumERAGON
|
  |
| Joined: 18 Apr 2012 |
| Total Posts: 3893 |
|
| |
|
|
| 25 Mar 2014 03:08 PM |
| It's just a condensed version of what you wrote. I'm not sure if I understand what this person is trying to do, still. |
|
|
| Report Abuse |
|
|
YumERAGON
|
  |
| Joined: 18 Apr 2012 |
| Total Posts: 3893 |
|
| |
|