So, I have this script that can change the color of my model. The thing I do not like is that it changes the color of my entire model, and I do not want that. I am confused because the "Children" of the model "Item" inside the model "Model" are named Parts, and that is their class name as well. I do not understand where "BasePart" is coming from, if the model does not have anything named "BasePart." Can someone help me?
if Model:FindFirstChild("CurrentColor") ~= nil then
local CurrentColor = Model.CurrentColor.Value
print("Found color")
for i,v in pairs(Model.Item:GetChildren()) do
if v:IsA("BasePart") and v.BrickColor.Name == CurrentColor.Name then
v.BrickColor = BrickColor.new(Color)
end

1 comment
Is there a way I can change the name of some of the bricks to Color, to make just those specific bricks change color?