generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: ImageButton GUI-Please assist

Previous Thread :: Next Thread 
JelloJoeBuscus is not online. JelloJoeBuscus
Joined: 10 Sep 2013
Total Posts: 129
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
JelloJoeBuscus is not online. JelloJoeBuscus
Joined: 10 Sep 2013
Total Posts: 129
20 Mar 2014 03:54 PM
(Bum) Bump
Report Abuse
RoflBread is not online. 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
JelloJoeBuscus is not online. JelloJoeBuscus
Joined: 10 Sep 2013
Total Posts: 129
20 Mar 2014 04:04 PM
That doesnt work either. The GUI part doesnt work.
Report Abuse
RoflBread is not online. 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
JelloJoeBuscus is not online. JelloJoeBuscus
Joined: 10 Sep 2013
Total Posts: 129
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
JelloJoeBuscus is not online. JelloJoeBuscus
Joined: 10 Sep 2013
Total Posts: 129
20 Mar 2014 04:14 PM
bUMP
Report Abuse
JelloJoeBuscus is not online. JelloJoeBuscus
Joined: 10 Sep 2013
Total Posts: 129
20 Mar 2014 04:19 PM
Hello? I need help still :(
Report Abuse
JelloJoeBuscus is not online. JelloJoeBuscus
Joined: 10 Sep 2013
Total Posts: 129
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image