Hi can someone please help me?
im trying to make a script that gets all the parts from a model and randomly picks one and turns them all the same colour from the Roblox brick colours
function changeModelBrickColor(model, brickcolor) for i, part in pairs(model:GetDescendants()) do if part:IsA("BasePart") then -- Check it is actually a part part.BrickColor = brickcolor if part:IsA("UnionOperation") then part.UsePartColor = true end end end end changeModelBrickColor(game.Workspace.YourModel, BrickColor.Random())
Replace "game.Workspace.YourModel" with the model you want to choose
Replace "BrickColor.Random()" with the brickcolor you want, if you want it to be a random color than don't change it at all
Hope this works!