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

How do you change multiple bricks color in a model?

Do you have to do them separately?

I'm making a hologram game.

When the orange button has been pressed, it lights up the other brick so you can walk to the other side of the map.

1 comment

0

(I'm horrible at explaining, sorry :P)

1 answer

Not exactly sure what you're asking, but based on the title you provided, it should look something like this:

newColor = BrickColor.new("Really red");

model = game.Workspace.MyModel;

for i, v in ipairs(model:GetChildren()) do
	if(v:IsA("Part") or v:IsA("BasePart")) then
		v.BrickColor = newColor;
	end
end

2 comments

2

Switch :IsA("Part") to :IsA("BasePart") BaseParts include parts, wedges, unions and the others

0

Thanks, I had forgot about BaseParts.

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