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
 

How can I put Color3 datas in a table?

Previous Thread :: Next Thread 
compy111 is not online. 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
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
10 Sep 2013 12:33 PM
Color3.new(130/255, 110/255, 36/255)
Report Abuse
compy111 is not online. 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
Notunknown99 is not online. Notunknown99
Joined: 05 Sep 2008
Total Posts: 25360
10 Sep 2013 12:43 PM
You can put everything in a table.
Report Abuse
yoshimaster240102 is not online. yoshimaster240102
Joined: 14 Apr 2012
Total Posts: 470
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 is not online. 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
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