Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can i change the color of a part depending on the value of a brickcolorvalue?

Asked by 6 years ago

Lets say i have a model that has two children another model, and a brickcolor value but the model that is child the the original model contains a part. say the brickcolorvalue's value is set to Really red. how can i make the color of the part depending on the value of the brickcolorvalue via a script that is with the second model

im absolutely clueless on what to do but this is what i have tried

value = script.Parent.Parent.Value.Value

script.Parent.Part.BrickColor = BrickColor.new(value)
0
1) What you are doing with BrickColor.new, is basically doing Vector3.new(Vector3.new(1, 1, 1)). 2) That script would work perfectly fine. hiimgoodpack 2009 — 6y
0
but it doesnt DreamSkyHigh 30 — 6y
0
I don't understand can you screenshot your Workspace for that and tell us which Values you are using? KenUSM 53 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago
value = script.Parent.Parent.PartColor.Value -- Changed the name because you used Value before the .Value, change the name

script.Parent.Part.BrickColor = value -- Since value is already a brick color, so, if we were to do the same method, but without the brick color value you would've done BrickColor.new(BrickColor.new("<color>"))
Ad

Answer this question