of     1   

Cheater
#63482905Sunday, February 26, 2012 5:02 PM GMT

How the title says, I'm trying to create a script that changes the colors slowly from yellow to green and back again. My problem is finding out how to use all the color functions (Color3, etc.). I'm really confused now. Can you just tell me how you would add a tiny part of green and remove a tiny part of yellow? Example: We have the color numbered like that 255/0/0 (so red basicly). Now I wanna add one to make it green and remove one of the red. So then it will be 254/1/0. That's the only thing I wanna find out, how to do that. I would be glad for your help. (Ik it is some sort of request)
hehe
#63483529Sunday, February 26, 2012 5:11 PM GMT

If you want to change a brick's color then you would use BrickColor.new(). And you would use brickcolor codes, numbers or words work. http://wiki.roblox.com/index.php/Color_Codes Ex. brick = game.Workspace:findFirstChild("Part") while wait() do brick.BrickColor = BrickColor.new("Bright yellow") wait(1) brick.BrickColor = BrickColor.new("Bright green") end
C0D3Y
#63483771Sunday, February 26, 2012 5:14 PM GMT

My guess would be using a for statement that adds and subtracts from certain things... Not exactly sure if it would work or not though.
Cheater
#63483918Sunday, February 26, 2012 5:17 PM GMT

Next time read better. I don't wanna change a bricks color AT ONCE from yellow to green or whatever. I wanna change it slowly (I think I'll use the while true do than). So it looks like it slowly changes to yellow. Like first it is regular green, than it looks like a light green, than it looks like a green yellow and than it looks like a light yellow and so on.
Cheater
#63483963Sunday, February 26, 2012 5:17 PM GMT

I meant hehe with the message above.
nate890
#63484463Sunday, February 26, 2012 5:25 PM GMT

Liek dis? *Youtube "Colour Spectrum :o" 4th video* "Bro five! Wear this to let everyone know you think they deserve a high five."
Cheater
#63485243Sunday, February 26, 2012 5:38 PM GMT

Just with a brick.
nate890
#63485658Sunday, February 26, 2012 5:44 PM GMT

Use this and change VertexColor (Vector3) http://www.roblox.com/Free-Color-Brick-item?id=17090474 "Bro five! Wear this to let everyone know you think they deserve a high five."
stravant
Forum Moderator
#63485926Sunday, February 26, 2012 5:48 PM GMT

Then you have to use an ugly BlockMesh. If it doesn't have to be perfect then you can use BrickColor.new(Color3.new( r, g, b )) to get the nearest BrickColor to a given r/g/b triplet.
Riderj
#63485983Sunday, February 26, 2012 5:49 PM GMT

I would just get the RGB colors of green and yellow then do something like this: for i=1,0,-.1 do Workspace.Brick.BrickColor = BrickColor.new(Color3.new(yellowR*i,YellowG*i,YellowB*i)) end Using this simple outline you can achieve such a task. [[ 7/10 - Scripting| 4/10 - Building | 10/10 - Confused ]]
Riderj
#63486068Sunday, February 26, 2012 5:51 PM GMT

Forgot a wait above my end :o Edit: for i=1,0,-.1 do Workspace.Brick.BrickColor = BrickColor.new(Color3.new((yellowR/255)*i,(YellowG/255)*i,(YellowB/255)*i)) wait() end [[ 7/10 - Scripting| 4/10 - Building | 10/10 - Confused ]]
Cheater
#63486324Sunday, February 26, 2012 5:55 PM GMT

Oh right, BlockMesh has these numbers. Thx stravant. (xLEGOx, whatever) I'll try it and if I can't make it or I'm just too stupid for that I'll post again.
nate890
#63486450Sunday, February 26, 2012 5:57 PM GMT

If you wanted to complete a whole colour spectrum, like me, you can get a colour spectrum formula. "Bro five! Wear this to let everyone know you think they deserve a high five."
Cheater
#63488308Sunday, February 26, 2012 6:27 PM GMT

I can change the VertexColor to whatever I want to in a BlockMesh. It does't change the color at all. Am I doing something wrong or forgeting anything?
Cheater
#63536896Monday, February 27, 2012 6:07 PM GMT

Does nobody know? I think someone does.
AgentFirefox
Top 100 Poster
#63537562Monday, February 27, 2012 6:38 PM GMT

function colorTransition(Part, NewColor, Time, Steps)     Time = Time or 1     Steps = Steps or 5     local cr, cg, cb = Part.BrickColor.r, Part.BrickColor.g, Part.BrickColor.b     local dr, dg, db = NewColor.r - cr, NewColor.g - cg, NewColor.b - cb     local sr, sg, sb = dr/Steps, dg/Steps, db/Steps     for i = 1, Steps do         cr, cg, cb = cr + sr, cg + sg, cb + sb         Part.BrickColor = BrickColor.new( Color3.new(cr, cg, cb) )         wait(Time/Steps)     end end --- EXAMPLES --- colorTransition(script.Parent, BrickColor.new("Really red"), 10, 20) colorTransition(script.Parent, BrickColor.new("Bright violet"), 5) colorTransition(script.Parent, BrickColor.new("Camo"))
theburnboss
#63537818Monday, February 27, 2012 6:49 PM GMT

You could also try to have a brick welded at the same part then have it the first color and slowly take away its transparency.

    of     1