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: Uh, buggy SelectionBox?

Previous Thread :: Next Thread 
Blues714 is not online. 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 is not online. noah
Joined: 11 Sep 2006
Total Posts: 18977
28 Aug 2014 12:53 AM
Those are not real events.. o.o
Report Abuse
Blues714 is not online. Blues714
Joined: 23 Dec 2008
Total Posts: 6507
28 Aug 2014 12:54 AM
Surprisingly, they are.
Report Abuse
noah is not online. noah
Joined: 11 Sep 2006
Total Posts: 18977
28 Aug 2014 12:55 AM
Link me to their wiki pages.
Report Abuse
Blues714 is not online. 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 is not online. Blues714
Joined: 23 Dec 2008
Total Posts: 6507
28 Aug 2014 01:11 AM
b1
Report Abuse
noah is not online. 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 is not online. Blues714
Joined: 23 Dec 2008
Total Posts: 6507
28 Aug 2014 01:28 AM
b2
Report Abuse
WishNite is not online. WishNite
Joined: 11 Feb 2009
Total Posts: 15828
28 Aug 2014 01:31 AM
Use .RenderStepped instead.
Report Abuse
WishNite is not online. 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 is not online. Blues714
Joined: 23 Dec 2008
Total Posts: 6507
28 Aug 2014 01:34 AM
@WishNite

It makes the flashing longer..
Report Abuse
Blues714 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. Blues714
Joined: 23 Dec 2008
Total Posts: 6507
28 Aug 2014 01:46 AM
b3
Report Abuse
Blues714 is not online. Blues714
Joined: 23 Dec 2008
Total Posts: 6507
28 Aug 2014 01:52 AM
b4
Report Abuse
Blues714 is not online. Blues714
Joined: 23 Dec 2008
Total Posts: 6507
28 Aug 2014 02:08 AM
*sigh*

b5
Report Abuse
Blues714 is not online. Blues714
Joined: 23 Dec 2008
Total Posts: 6507
28 Aug 2014 02:17 AM
b6
Report Abuse
Blues714 is not online. Blues714
Joined: 23 Dec 2008
Total Posts: 6507
28 Aug 2014 07:35 PM
b7
Report Abuse
Blues714 is not online. 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 is not online. Blues714
Joined: 23 Dec 2008
Total Posts: 6507
28 Aug 2014 08:05 PM
or should I say, 'solved'?
Report Abuse
Blues714 is not online. Blues714
Joined: 23 Dec 2008
Total Posts: 6507
28 Aug 2014 08:49 PM
b9
Report Abuse
DrMathematica is not online. DrMathematica
Joined: 29 Aug 2008
Total Posts: 27268
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 is not online. 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
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