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
|
  |
| 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
|
  |
| 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
|
  |
| Joined: 11 Jul 2011 |
| Total Posts: 8026 |
|
| |
|
|
| 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
|
  |
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| 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
|
  |
| 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
|
  |
| Joined: 11 Jul 2011 |
| Total Posts: 8026 |
|
| |
|