|
| 14 Oct 2015 04:00 PM |
script.Parent.MouseLeave:connect(function() if script.Parent then script.Parent:TweenSize(UDim2.new(0.6,0,0.1,-10), "Out", "Sine", 0.5) end end)
I'm using this for a GUI and it seems to be somewhat buggy. Sometimes it'll work when I move my mouse out and sometimes it won't. Is there any alternatives that I could use that would be much more reliable? |
|
|
| Report Abuse |
|
|
| |
|
Riderj
|
  |
| Joined: 15 Aug 2011 |
| Total Posts: 1534 |
|
|
| 14 Oct 2015 06:30 PM |
| First of all, the event has parameters passed to it x,y. The other alternative, probably more complex than using a roblox supported event, is to use the position and size offsets. You would do this by comparing the Mouse services origin property to the position of the gui element +/- the absolute value of the size/2 since the element is positioned by the center of the element. Though I've used this event, and have not had any issues with it. |
|
|
| Report Abuse |
|
|