|
| 20 Mar 2014 03:45 PM |
So I made this Image Button right?
When I select a certain tool, the gui is closed until I click the image button that corresponds to the GUI. When I click that image button, the GUI opens up.
Thats whats SUPPOSED to happen.
However, I need to know why it wont work.
Heres the script Im trying
button = script.Parent frame = button.Parent.frame
function onClick() frame.Visible = false frame.Visible = true end
button.MouseButton1Click:connect(onClick)
The Hierarchy is ImageButton> Script Frame
Frame has two GUI textbuttons inside of it
ImageButton is inside of a screen gui
Now is my script correct? if not, how do I fix it? What is the correct script? Why am I asking so many questions? Please help. |
|
|
| Report Abuse |
|
|
| |
|
RoflBread
|
  |
| Joined: 18 Jun 2009 |
| Total Posts: 3803 |
|
|
| 20 Mar 2014 03:57 PM |
button = script.Parent frame = button.Parent.frame
function onClick() frame.Visible = not frame.Visible end
button.MouseButton1Click:connect(onClick) |
|
|
| Report Abuse |
|
|
|
| 20 Mar 2014 04:04 PM |
| That doesnt work either. The GUI part doesnt work. |
|
|
| Report Abuse |
|
|
RoflBread
|
  |
| Joined: 18 Jun 2009 |
| Total Posts: 3803 |
|
|
| 20 Mar 2014 04:06 PM |
| What exactly is wrong, i'm a little confused |
|
|
| Report Abuse |
|
|
|
| 20 Mar 2014 04:09 PM |
Well the Image Button works. HOWEVER
I want the ImageButton to open up another GUI. But I need to know how to make it so I can do that. Watch, go on my server and try to open the "m" button. Its supposed to open another GUI. But it wont appear when I have it set to appear.
I turned the GUI that I want to appear invisible in the properties, so that itll become visible when clicked |
|
|
| Report Abuse |
|
|
| |
|
|
| 20 Mar 2014 04:19 PM |
| Hello? I need help still :( |
|
|
| Report Abuse |
|
|
|
| 20 Mar 2014 04:22 PM |
I FIXED THE PROBLEM
I had the hierarchy wrong. Frame shouldve been in the parent of the imagebutton. |
|
|
| Report Abuse |
|
|