compy111
|
  |
| Joined: 02 Apr 2009 |
| Total Posts: 583 |
|
|
| 10 Sep 2013 12:31 PM |
I like to use much variables to be able to change scripts in a few seconds. Currently I am working on a game where there is a Gui that contains 3 colors. (color3 values) These colors change depending on a StringValue, so I wanted to make a table that contains the 3 colors each type, example:
type1 = {color1, color2, color3} type2 = {color1, color2, color3} type3 = {color1, color2, color3}
But I want to use color3 values as [130, 110, 36] How can I put those in there? |
|
|
| Report Abuse |
|
|
|
| 10 Sep 2013 12:33 PM |
| Color3.new(130/255, 110/255, 36/255) |
|
|
| Report Abuse |
|
|
compy111
|
  |
| Joined: 02 Apr 2009 |
| Total Posts: 583 |
|
|
| 10 Sep 2013 12:36 PM |
| oh thx, didnt think it was possible to put that in a table lol. |
|
|
| Report Abuse |
|
|
|
| 10 Sep 2013 12:43 PM |
| You can put everything in a table. |
|
|
| Report Abuse |
|
|
|
| 10 Sep 2013 02:03 PM |
And to insert somthing just do:
table.insert(tablename, 0) --The 0 can be a string, number, thread, object |
|
|
| Report Abuse |
|
|
1waffle1
|
  |
| Joined: 16 Oct 2007 |
| Total Posts: 16381 |
|
|
| 10 Sep 2013 02:43 PM |
wrote this real quick:
setfenv(1,setmetatable({Color3={new=function(r,g,b)return Color3.new(r/255,g/255,b/255)end}},{__index=function(t,k)return rawget(t,k)or loadstring('return '..k)()end})) print(BrickColor.new(Color3.new(0,0,255))) type1={Color3.new(130,110,36)} |
|
|
| Report Abuse |
|
|