|
| 28 Jun 2014 12:13 AM |
Alright, so i've put together a few scripts in my game by just scavenging the roblox wiki, and now i'm to this one - to me, who doesn't know much about scripting, it seems like it should work, but it doesn't. What I want it to do is make ImageLabel (Which is a child of TextButton, the parent of script) visible when the mouse hovers over TextButton, but not visible when it does not. Can someone please look over this and tell me what's wrong, and how I could fix it?
GuiObject.MouseEnter:connect(function(x, y) script.Parent.ImageLabel.Visible = true end) GUI.MouseLeave:connect(function() script.Parent.ImageLabel.Visible = false end)
Thanks, SwordMaster128 |
|
|
| Report Abuse |
|
KEVEKEV77
|
  |
| Joined: 12 Mar 2009 |
| Total Posts: 6961 |
|
|
| 28 Jun 2014 12:15 AM |
script.Parent.MouseEnter:connect(function(x, y) script.Parent.ImageLabel.Visible = true end) script.Parent.MouseLeave:connect(function() script.Parent.ImageLabel.Visible = false end) |
|
|
| Report Abuse |
|
|
| 28 Jun 2014 12:16 AM |
Looks alright... but make SURE you have "GuiObject" and "GUI" defined!! If not, this will not work at all. :/ you also don't need to pass in the (x,y) parameters.. replace that with () :P
Just make sure your ImageLabel is in the right place, too. Can you provide the error if there is one?
-The [Guy] |
|
|
| Report Abuse |
|