Here is a portion of my script:
for i,v in pairs(hit.Parent:GetChildren()) do if v.ClassName == "Part" then local bc = Instance.new("StringValue") bc.Parent = v bc.Name = v.Name bc.Value = v.BrickColor end end
It says that it expected a string, got brickcolor. How do I get the string value of a brickcolor?
Gotta use BrickColor.Name
for i,v in pairs(hit.Parent:GetChildren()) do if v.ClassName == "Part" then local bc = Instance.new("StringValue") bc.Parent = v bc.Name = v.Name bc.Value = v.BrickColor.Name -- Will give the name of the brickcolor in a string end end