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: GUI Mouseover Effect

Previous Thread :: Next Thread 
drew8732 is not online. drew8732
Joined: 01 Apr 2010
Total Posts: 1965
20 Aug 2013 04:43 PM
What function could I use so when people MouseOver my TextBox, its border color changes? (To look like it's being "highlighted.")

I found one called MouseMoved on the wiki, but it didn't look right for what I'm trying to do. I'd like the script to be parented to be TextBox.

I'm assuming it's called something like "MouseOver?" Thanks!

Report Abuse
Jetta765214 is not online. Jetta765214
Joined: 22 Oct 2008
Total Posts: 1855
20 Aug 2013 04:46 PM
http://wiki.roblox.com/index.php/RBX.lua.TextBox_%28Object%29

MouseEnter

Just look at the wiki page.
Report Abuse
Kasumo is online. Kasumo
Joined: 22 Mar 2013
Total Posts: 2467
20 Aug 2013 04:54 PM
Put a script inside the text button and add this code inside:

script.Parent.MouseEnter:connect(function() --When the mouse enters.
script.Parent.TextStrokeColor3 = Color3.new(255,255,255) --Change the number's to your liking.
for i = 1,10 do
script.Parent.TextStrokeTransparency = script.Parent.TextStrokeTransparency - .1
wait(0.025)
end
end)

script.Parent.MouseLeave:connect(function() --When the mouse leaves.
script.Parent.TextStrokeColor3 = Color3.new(255,255,255) --Again, change the number's to your liking.
for i = 1,10 do
script.Parent.TextStrokeTransparency = script.Parent.TextStrokeTransparency + .1
wait(0.025)
end
end)
Report Abuse
drew8732 is not online. drew8732
Joined: 01 Apr 2010
Total Posts: 1965
20 Aug 2013 07:52 PM
Thanks! But just wondering, what's the "for i = 1,10 do" part about? I've seen that line in a lot of scripts and just wondered how it works.
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
20 Aug 2013 07:55 PM
http://www.roblox.com/Forum/ShowPost.aspx?PostID=110411773
Report Abuse
Kasumo is online. Kasumo
Joined: 22 Mar 2013
Total Posts: 2467
20 Aug 2013 07:57 PM
I used the for i = 1,10 part to make a smooth effect. So when the mouse enter's the text box the color will fade in smoothly. Rather than just being choppy and automatically turn whatever color.

Now if you want to know what 'for' actually means, 'for' is a type of loop and is used for running a command a certain amount of times. The first number is that starting value, and the second number is the ending value.

Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
20 Aug 2013 07:59 PM
and the optional third number is the increasement
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