i asked a question a little while ago, i got an answer that worked but i didn't get a chance to expand on it, basically i got neon lights (Parts with neon texture) with point lights inside them. i was wondering how i could rearrange this script so the colour of the light matches the brick colour every time it changes. (If that makes any sense)
script:
01 | math.randomseed(tick()) |
02 | PartsToTurnColor = game.Workspace.CULUR:GetChildren()want to change color here |
03 | Colors = { BrickColor.new( "Royal purple" ),BrickColor.new( "Steel blue" ),BrickColor.new( "Pastel blue-green" ),BrickColor.new( "Hot pink" ),BrickColor.new( "Bright bluish green" ) } |
04 |
05 | while wait( 130 ) do |
06 | color = Colors [ math.random( 1 ,#Colors) ] |
07 | for _,v in pairs (PartsToTurnColor) do |
08 | v.BrickColor = color |
09 | end |
10 | end |
if you change the brick color of a part then the rgb value will change as well, just grab the Color3 value and put it inside the lights Color3 Value
01 | math.randomseed(tick()) |
02 | PartsToTurnColor = game.Workspace.CULUR:GetChildren()want to change color here |
03 | Colors = { BrickColor.new( "Royal purple" ),BrickColor.new( "Steel blue" ),BrickColor.new( "Pastel blue-green" ),BrickColor.new( "Hot pink" ),BrickColor.new( "Bright bluish green" ) } |
04 |
05 | while wait( 130 ) do |
06 | color = Colors [ math.random( 1 ,#Colors) ] |
07 | for _,v in pairs (PartsToTurnColor) do |
08 | v.BrickColor = color |
09 | pointlight.Color = v.Color |
10 | end |
11 | end |
Solve
You have to translate the brick colors to the RGB colors.
(Think)
I prefer to use color3 instead, because it will be more convenient.
1 | BrickColor = { etc. } |
2 | ...... |
3 | Local color = Colors [ math.random( 1 ,#Colors) ] |
4 | Brick.BrickColor = color |
5 | Local RGB = Brick.Color 3 |
This is just an idea. Not a SCRIPT!