Blues714
|
  |
| Joined: 23 Dec 2008 |
| Total Posts: 6507 |
|
|
| 28 Aug 2014 12:47 AM |
I'm having a strange glitch where when you hover and immediately unhover over a brick, the selectionbox will flash a couple times, and disappear. However, if you kept hovering for a few seconds, it'll disappear like normal.
box = script.Parent.Parent.SelectionBox box.Adornee = box.Parent
script.Parent.MouseHoverEnter:connect(function() for i = 0, 0.5, 0.055 do box.Transparency = 1 - i wait(0.01 - i) end end)
script.Parent.MouseHoverLeave:connect(function() for i = 0, 1, 0.055 do box.Transparency = 0.5 + i wait(0.01 - i) end end)
script.Parent.MouseHoverLeave:connect(function() mouseover = false end) |
|
|
| Report Abuse |
|
|
noah
|
  |
| Joined: 11 Sep 2006 |
| Total Posts: 18977 |
|
|
| 28 Aug 2014 12:53 AM |
| Those are not real events.. o.o |
|
|
| Report Abuse |
|
|
Blues714
|
  |
| Joined: 23 Dec 2008 |
| Total Posts: 6507 |
|
| |
|
noah
|
  |
| Joined: 11 Sep 2006 |
| Total Posts: 18977 |
|
|
| 28 Aug 2014 12:55 AM |
| Link me to their wiki pages. |
|
|
| Report Abuse |
|
|
Blues714
|
  |
| Joined: 23 Dec 2008 |
| Total Posts: 6507 |
|
|
| 28 Aug 2014 12:56 AM |
http://wiki.roblox.com/index.php?title=RBX.lua.ClickDetector_(Object)
events |
|
|
| Report Abuse |
|
|
Blues714
|
  |
| Joined: 23 Dec 2008 |
| Total Posts: 6507 |
|
| |
|
noah
|
  |
| Joined: 11 Sep 2006 |
| Total Posts: 18977 |
|
|
| 28 Aug 2014 01:13 AM |
| Well.. I would suggest trying to use a debounce, but it looks like you already have a random debounce in the last event. |
|
|
| Report Abuse |
|
|
Blues714
|
  |
| Joined: 23 Dec 2008 |
| Total Posts: 6507 |
|
| |
|
WishNite
|
  |
| Joined: 11 Feb 2009 |
| Total Posts: 15828 |
|
|
| 28 Aug 2014 01:31 AM |
| Use .RenderStepped instead. |
|
|
| Report Abuse |
|
|
WishNite
|
  |
| Joined: 11 Feb 2009 |
| Total Posts: 15828 |
|
|
| 28 Aug 2014 01:33 AM |
Oh, wait, nevermind.
for i = 0, 1, 0.055 do if mouseover == false then break
you have to BREAK the loop otherwise it will keep on running |
|
|
| Report Abuse |
|
|
Blues714
|
  |
| Joined: 23 Dec 2008 |
| Total Posts: 6507 |
|
|
| 28 Aug 2014 01:34 AM |
@WishNite
It makes the flashing longer.. |
|
|
| Report Abuse |
|
|
Blues714
|
  |
| Joined: 23 Dec 2008 |
| Total Posts: 6507 |
|
|
| 28 Aug 2014 01:34 AM |
@Wishnite
(my last post was referring to your previous post. l000l)
anyways, i'll try that. |
|
|
| Report Abuse |
|
|
Blues714
|
  |
| Joined: 23 Dec 2008 |
| Total Posts: 6507 |
|
|
| 28 Aug 2014 01:37 AM |
@WishNite
I forgot to mention that I can't break the for loop. It is used to smoothen the transparency.. |
|
|
| Report Abuse |
|
|
WishNite
|
  |
| Joined: 11 Feb 2009 |
| Total Posts: 15828 |
|
|
| 28 Aug 2014 01:39 AM |
script.Parent.MouseHoverEnter:connect(function() mouseover = true for i = 0, 0.5, 0.055 do if mouseover == false then break else box.Transparency = 1 - i wait(0.01 - i) end end end)
|
|
|
| Report Abuse |
|
|
WishNite
|
  |
| Joined: 11 Feb 2009 |
| Total Posts: 15828 |
|
|
| 28 Aug 2014 01:39 AM |
you might have to do something like
for i = box.Transparency, .5, .055 do
|
|
|
| Report Abuse |
|
|
Blues714
|
  |
| Joined: 23 Dec 2008 |
| Total Posts: 6507 |
|
| |
|
Blues714
|
  |
| Joined: 23 Dec 2008 |
| Total Posts: 6507 |
|
| |
|
Blues714
|
  |
| Joined: 23 Dec 2008 |
| Total Posts: 6507 |
|
| |
|
Blues714
|
  |
| Joined: 23 Dec 2008 |
| Total Posts: 6507 |
|
| |
|
Blues714
|
  |
| Joined: 23 Dec 2008 |
| Total Posts: 6507 |
|
| |
|
Blues714
|
  |
| Joined: 23 Dec 2008 |
| Total Posts: 6507 |
|
|
| 28 Aug 2014 08:04 PM |
b8
i've made many help requests before, and none of them were answered. surprise surprise. |
|
|
| Report Abuse |
|
|
Blues714
|
  |
| Joined: 23 Dec 2008 |
| Total Posts: 6507 |
|
|
| 28 Aug 2014 08:05 PM |
| or should I say, 'solved'? |
|
|
| Report Abuse |
|
|
Blues714
|
  |
| Joined: 23 Dec 2008 |
| Total Posts: 6507 |
|
| |
|
|
| 28 Aug 2014 08:53 PM |
Your problem was solved a while ago.
Like the first poster said, use a debounce. What is happening is that the event is firing multiple times, and thus causing multiple loops to do things to the object. |
|
|
| Report Abuse |
|
|
Blues714
|
  |
| Joined: 23 Dec 2008 |
| Total Posts: 6507 |
|
|
| 28 Aug 2014 09:12 PM |
@Dr
I've tested w/ debounces already. The SelectionBox is still flickering. |
|
|
| Report Abuse |
|
|