Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

i got error BrickColor is not a valid property name?

i am trying to make a lego car and so that the color change feature i will make later works i tried to make this script

local color1 = script.Parent.Parent.color1.Value

script.Parent.BrickColor = color1

local function onColorChange()
	script.Parent.BrickColor = color1
end

script.Parent.Parent.color1:GetPropertyChangedSignal("BrickColor"):Connect(onColorChange)

1 answer

✓ Accepted answer

To do this, you would need a "BrickColor.new", since you are creating a "new" brick color to replace the old one. Assuming the value of color one is correct, like "Bright red" or something, you can do this:

local color1 = script.Parent.Parent.color1.Value

script.Parent.BrickColor = BrickColor.new(color1)

local function onColorChange()
    script.Parent.BrickColor = BrickColor.new(color1)
end

script.Parent.Parent.color1:GetPropertyChangedSignal("BrickColor"):Connect(onColorChange)

If this has helped, please accept this answer :)

2 comments

0

THAT WAS HALF THE ANSER

0

oops caps and also i figured that i neede to put in value at the bottom not brick color

This discussion is preserved as it was. New answers, comments, and votes are closed.