Afr1c4n
|
  |
| Joined: 12 Jul 2011 |
| Total Posts: 223 |
|
|
| 01 Jan 2014 02:42 PM |
For some reason I try to turn my gui green but it turns black?? Can anyone fix this?
function OnClicked () script.Parent.BackgroundColor3 = Color3.new (1/255/1) end script.Parent.MouseButton1Click:connect (OnClicked) |
|
|
| Report Abuse |
|
|
VilleSlay
|
  |
| Joined: 14 May 2011 |
| Total Posts: 1405 |
|
|
| 01 Jan 2014 02:46 PM |
Color3 requires 3 different number values. 1/255/1 is only 1. To indicate that they are not the same number, use a comma.
Example:
script.Parent.BackgroundColor3 = Color3.new (1 ,255 ,1)
To actually get the green color you want, you should do this:
function Color(r, g, b) return Color3.new(r/255, g/255, b/255) end
script.Parent.BackgroundColor3 = Color(1, 255, 1)--This will call the function named Color.
~~> Ville <~~ |
|
|
| Report Abuse |
|
|
Afr1c4n
|
  |
| Joined: 12 Jul 2011 |
| Total Posts: 223 |
|
|
| 01 Jan 2014 02:49 PM |
| What if I want it to function when I click so MouseButton1Click |
|
|
| Report Abuse |
|
|
Kingmouli
|
  |
| Joined: 28 Sep 2012 |
| Total Posts: 1292 |
|
|
| 01 Jan 2014 02:49 PM |
Output? I think it should be Color3.new(NUMBER BTW 0-1, NUMBER BTW 0-1, NUMBER BTW 0-1)
~Kingmouli, King of the Mouli~ |
|
|
| Report Abuse |
|
|
Kingmouli
|
  |
| Joined: 28 Sep 2012 |
| Total Posts: 1292 |
|
|
| 01 Jan 2014 02:51 PM |
Someone ninja-ed me xD
~Kingmouli, King of the Mouli~ |
|
|
| Report Abuse |
|
|
VilleSlay
|
  |
| Joined: 14 May 2011 |
| Total Posts: 1405 |
|
|
| 01 Jan 2014 02:53 PM |
function Color(r, g, b) return Color3.new(r/255, g/255, b/255) end
script.Parent.MouseButton1Down:connect(function() script.Parent.BackgroundColor3 = Color(1, 255, 1) end)
~~> Ville <~~ |
|
|
| Report Abuse |
|
|