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 Help?

Previous Thread :: Next Thread 
RainbowPianoUnicorn is not online. RainbowPianoUnicorn
Joined: 30 Mar 2014
Total Posts: 168
23 Jun 2014 02:02 PM
This is the script:
function OnMouseHover()
script.Parent.Info.BackgroundTransparency = 0.4
end
script.Parent.MouseEnter:connect(OnMouseHover)

function OnMouseNotHover()
script.Parent.Info.BackgroundTransparency = 1
end
script.Parent.MouseLeave:connect(OnMouseNotHover)

So basically, if the mouse hovers over the parent, then the BackGroundTransparency is set to the value. If it not, then the background transparency is set to another value. I want to make a hover GUI, and it works so far.

Basically, when you hover over the gun buy button, its stats pop up. But the problem is, only the Info (which is a Frame) goes transparent, not its children which are TextBoxes. I would like the entire thing to disappear!

Is there any way to make all the children of 'Info' transparency 0.4 when the mouse is over them, and 1 when it is not?
Thanks for all replies!
Report Abuse
RainbowPianoUnicorn is not online. RainbowPianoUnicorn
Joined: 30 Mar 2014
Total Posts: 168
23 Jun 2014 02:06 PM
BUMP!
In a more simpler way, is there a way to select all the CHILDREN of the thing (AND THE THING ITSELF) and edit them?
Report Abuse
Rethiux is not online. Rethiux
Joined: 14 Nov 2012
Total Posts: 1132
23 Jun 2014 02:08 PM
Use the Visible button.
Report Abuse
RainbowPianoUnicorn is not online. RainbowPianoUnicorn
Joined: 30 Mar 2014
Total Posts: 168
23 Jun 2014 02:09 PM
How? Sorry, I don't really get it.
Report Abuse
RainbowPianoUnicorn is not online. RainbowPianoUnicorn
Joined: 30 Mar 2014
Total Posts: 168
23 Jun 2014 02:11 PM
function OnMouseHover()
script.Parent:GetChildren(TextBox)BackgroundTransparency = 0.4
end
script.Parent.MouseEnter:connect(OnMouseHover)

function OnMouseNotHover()
script.Parent:GetChildren(TextBox)BackgroundTransparency = 1
end
script.Parent.MouseLeave:connect(OnMouseNotHover)

How about this?
Report Abuse
RainbowPianoUnicorn is not online. RainbowPianoUnicorn
Joined: 30 Mar 2014
Total Posts: 168
23 Jun 2014 02:13 PM
Nope, even worse now.
Report Abuse
Rethiux is not online. Rethiux
Joined: 14 Nov 2012
Total Posts: 1132
23 Jun 2014 02:20 PM
local GUI = "Whatever the GUI is here"
local C = GUI:GetChildren()
function OnMouseHover()
C.Visible = true
end

function OnMouseNotHover()
C.Visible = false
end


script.Parent.MouseLeave:connect(OnMouseNotHover)

script.Parent.MouseEnter:connect(OnMouseHover)
Report Abuse
RainbowPianoUnicorn is not online. RainbowPianoUnicorn
Joined: 30 Mar 2014
Total Posts: 168
23 Jun 2014 02:20 PM

function OnMouseHover()
script.Parent.Info.BackgroundTransparency = 0.4
script.Parent.Info.TextBox.BackgroundTransparency = 1
script.Parent.Info.TextBox1.BackgroundTransparency = 1
script.Parent.Info.TextBox2.BackgroundTransparency = 1
script.Parent.Info.TextBox3.BackgroundTransparency = 1
script.Parent.Info.TextBox.TextTransparency = 0
script.Parent.Info.TextBox1.TextTransparency = 0
script.Parent.Info.TextBox2.TextTransparency = 0
script.Parent.Info.TextBox3.TextTransparency = 0
end
script.Parent.MouseEnter:connect(OnMouseHover)

function OnMouseNotHover()
script.Parent.Info.BackgroundTransparency = 1
script.Parent.Info.TextBox.TextTransparency = 1
script.Parent.Info.TextBox1.TextTransparency = 1
script.Parent.Info.TextBox2.TextTransparency = 1
script.Parent.Info.TextBox3.TextTransparency = 1
end
script.Parent.MouseLeave:connect(OnMouseNotHover)

Here is the finished script! It took a while but I just individually selected all of the children (which were TextBoxes) and made them a certain transparency.
Report Abuse
RainbowPianoUnicorn is not online. RainbowPianoUnicorn
Joined: 30 Mar 2014
Total Posts: 168
23 Jun 2014 02:21 PM
Thanks anyway, Rethiux, that's a lot less than mine :D.
Report Abuse
DevFrank is not online. DevFrank
Joined: 04 Apr 2012
Total Posts: 1469
23 Jun 2014 02:22 PM

function OnMouseHover ()
script.Parent.Info.Visible = true
end
script.Parent.MouseEnter:connect(OnMouseHover)

function OnMouseNotHover()
script.Parent.Info.Visible = false
end
script.Parent.MouseLeave:connect(OnMouseNotHover)



have its transpsarency to 0.4 and use this.

Report Abuse
Rethiux is not online. Rethiux
Joined: 14 Nov 2012
Total Posts: 1132
23 Jun 2014 02:25 PM
@Dev; That's basically mine...
Report Abuse
DevFrank is not online. DevFrank
Joined: 04 Apr 2012
Total Posts: 1469
23 Jun 2014 02:27 PM
Still. Mine might be easier to understand for others.
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