Postured
|
  |
| Joined: 02 Feb 2012 |
| Total Posts: 114 |
|
|
| 25 Jun 2012 02:06 PM |
This script is supposed turn the part to black when you hover your mouse over it, and then to grey when the mouse leaves it. Output is telling me, however, that MouseHoverEnter isn't a valid member of Part. It also states that lines 5 and 11 need a ')' near playerWhoHovered, which does not make sense. Could someone please help?
X = script.Parent Det = script.Parent.ClickDetector
function Meter(MouseHoverEnter) if Det.MouseHoverEnter(Player playerWhoHovered) then -- Line 5 X.BrickColor = ("Really black") end end
function Meterless(MouseHoverLeave) if Det.MouseHoverLeave(Player playerWhoHovered) then -- Line 11 X.BrickColor = ("Medium stone grey") end end
X.MouseHoverEnter:connect(Meter) X.MouseHoverLeave:connect(Meterless)
> ↑ And that is how you confuse an atomic computer. ↑ ▬ Xžε⌐¡z○╖ |
|
|
| Report Abuse |
|
|
|
| 25 Jun 2012 02:15 PM |
| Those events are members of the ClickDetectors. |
|
|
| Report Abuse |
|
|
Postured
|
  |
| Joined: 02 Feb 2012 |
| Total Posts: 114 |
|
|
| 25 Jun 2012 02:19 PM |
LordSymphonic, how would I address this?
> ↑ And that is how you confuse an atomic computer. ↑ ▬ Xžε⌐¡z○╖ |
|
|
| Report Abuse |
|
|
|
| 25 Jun 2012 02:20 PM |
I think you did the events/functions incorrectly. Try:
X = script.Parent Det = X.ClickDetector
Det.MouseHoverEnter:connect(function() X.BrickColor = BrickColor.new("Really black") end)
Det.MouseHoverLeave:connect(function() X.BrickColor = BrickColor.new("Medium stone grey") end) |
|
|
| Report Abuse |
|
|
Postured
|
  |
| Joined: 02 Feb 2012 |
| Total Posts: 114 |
|
|
| 25 Jun 2012 02:23 PM |
Sweet, it works. Thank you.
> ↑ And that is how you confuse an atomic computer. ↑ ▬ Xžε⌐¡z○╖ |
|
|
| Report Abuse |
|
|
| |
|