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 » Scripters
Home Search
 

Re: how does this work

Previous Thread :: Next Thread 
Exflamed is not online. Exflamed
Joined: 11 Jul 2011
Total Posts: 8026
04 Sep 2016 10:36 AM
play = script.Parent

play.MouseEnter:connect(function(mouse)
wait()
play.BackgroundColor3 = (255, 255, 255)
end)

I want it so that if the mouse hovers over the textbutton, it changes tow white
Report Abuse
Zawie is not online. Zawie
Joined: 04 Jul 2010
Total Posts: 6338
04 Sep 2016 10:37 AM
Color3.new(1,1,1)
not
(255,255,255)


color3 works from 0-1 instead of 0-255
Report Abuse
Exflamed is not online. Exflamed
Joined: 11 Jul 2011
Total Posts: 8026
04 Sep 2016 10:37 AM
and would this have to be a local script?
Report Abuse
Exflamed is not online. Exflamed
Joined: 11 Jul 2011
Total Posts: 8026
04 Sep 2016 10:39 AM
it's not working
Report Abuse
Julian_Orteil is not online. Julian_Orteil
Joined: 14 Aug 2012
Total Posts: 968
04 Sep 2016 10:40 AM
Not true Zowie.

It can work from 0-1. But it also can work from 255.

Frame.BackgroundColor3 = Color3.new(255/255, 255/255, 255/255)

also works.


Report Abuse
Exflamed is not online. Exflamed
Joined: 11 Jul 2011
Total Posts: 8026
04 Sep 2016 10:41 AM
okay it works, but now how do I make the white go away once the mouse is off?
Report Abuse
Zawie is not online. Zawie
Joined: 04 Jul 2010
Total Posts: 6338
04 Sep 2016 10:42 AM
@Julian that is literally 0-1

You know what 255/255 is equal to mathematically? That's right: 1.
Report Abuse
Julian_Orteil is not online. Julian_Orteil
Joined: 14 Aug 2012
Total Posts: 968
04 Sep 2016 10:44 AM
But would you rather deal with decimals, and go through a bunch of unneeded math to find the equivalent to 85/255?


Report Abuse
Zawie is not online. Zawie
Joined: 04 Jul 2010
Total Posts: 6338
04 Sep 2016 10:44 AM
@ExFlamed
There is a similar event called MouseLeave

also you don't need the "wait" and MouseEnter doesn't return the mouse parameter and you don't use it anyways so you can just do

play = script.Parent
play.MouseEnter:connect(function()
play.BackgroundColor3 = Color3.new(1,1,1)
end
Report Abuse
Zawie is not online. Zawie
Joined: 04 Jul 2010
Total Posts: 6338
04 Sep 2016 10:44 AM
@Julian
85/255 is STILL 0 to 1
Jesus.
Report Abuse
Exflamed is not online. Exflamed
Joined: 11 Jul 2011
Total Posts: 8026
04 Sep 2016 10:45 AM
thanks, I got it.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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