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
BasePart is another class name of Part. Also, what are some bricks that you want the color to change into?