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: Gui Issues.

Previous Thread :: Next Thread 
KanataIzumi7 is not online. KanataIzumi7
Joined: 08 May 2011
Total Posts: 949
06 Jan 2014 07:46 AM
When there's a script that runs a function when a TextButton is clicked, does it seriously need to be in the same frame/parent item as the button?
I've tried to do this other ways, but none of them work unless the script and button are in the same parent.

Am I doing something wrong, or does Roblox do this naturally?
Report Abuse
yoshimaster240102 is not online. yoshimaster240102
Joined: 14 Apr 2012
Total Posts: 470
06 Jan 2014 07:48 AM
Not really. If you have a text button in a frame in a screen gui, and the script is in the screen gui, you can do this:

script.Parent.Frame.TextButton.MouseButton1Down:connect(function()
end)
Report Abuse
KanataIzumi7 is not online. KanataIzumi7
Joined: 08 May 2011
Total Posts: 949
06 Jan 2014 07:52 AM
That's what I've done, but it won't work. . - .

However, in this case; The layout is like this;

ScreenGui
>Script
>Frame1
>>ButtonA
>Frame2
>>Frame2b
>>>ButtonB
>>>ButtonC
etc.
Report Abuse
yoshimaster240102 is not online. yoshimaster240102
Joined: 14 Apr 2012
Total Posts: 470
06 Jan 2014 07:53 AM
Are you running all of the events in one script?
Report Abuse
yoshimaster240102 is not online. yoshimaster240102
Joined: 14 Apr 2012
Total Posts: 470
06 Jan 2014 07:54 AM
If so,

do this:

coroutine.wrap(function()
--Button 1 click stuff
end)()

coroutine.wrap(function()
--Button 2 click stuff
end)()

--Button 3 click stuff
Report Abuse
KanataIzumi7 is not online. KanataIzumi7
Joined: 08 May 2011
Total Posts: 949
06 Jan 2014 08:06 AM
Okay, and here's another problem.
While I can now click on them, it's only around the edges. Inside of each button I have ImageButton that only acts as an image for the button. I cna't click the utotn because the image is in the way, and when I set the image's activeness to false, they get a gray box over them....

Any tips on how to remove the gray box? (It's not the BackgroundTransparency as far as I can tell.)
Report Abuse
moryo7 is not online. moryo7
Joined: 19 Jul 2010
Total Posts: 5028
06 Jan 2014 08:44 AM
One way you can do it is to have both the imagebutton and the textbutton to do the same thing.

Alternatively, you can put another textbutton with a ZIndex higher than the original buttons over them, and make the background transparency 1, with no text.


✦мøяƴø子✦
Report Abuse
breuning is not online. breuning
Joined: 30 Oct 2008
Total Posts: 4268
06 Jan 2014 08:51 AM
why do you use imagebuttons as images for textbuttons
either use imagebuttons
or imagelabels and textbuttons
Report Abuse
KanataIzumi7 is not online. KanataIzumi7
Joined: 08 May 2011
Total Posts: 949
06 Jan 2014 08:31 PM
@Previous Post

I wanted the seleciton box around the image as well, but if it was in any style other than custom, the image would get super small.
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