The title pretty much says it all but, say if I didn't want to type out each one.
Something like this:
a = game.Workspace.Part1,Part2,Part3 a.BrickColor = BrickColor.new(1004)
I know that script would not work but is there any way like it?
I don't really care to type it out like this:
a = game.Workspace.Part1 b = game.Workspace.Part2 c = game.Workspace.Part3 a.BrickColor = BrickColor.new(1004) b.BrickColor = BrickColor.new(1004) c.BrickColor = BrickColor.new(1004)
I've got 88 parts that I need to change the color 24 times.
Thanks, Bb1
You could make a function to change the color of all the parts.
local parts = Workspace.Model -- Location of parts function setColor(color) for _, p in pairs(parts:GetChildren()) do p.BrickColor = BrickColor.new(color) end end -- example while true do setColor("Bright red") wait(20) setColor("Bright blue") wait(40) end
Well, yes. If you wouldn't mind grouping them all together, then it'll be possible to do it all in less lines. You'd need to use either the generic for loop or the numeric for loop. I'll use the generic.
Model = game.Workspace["Model"]:GetChildren() -- You can obviously change the name to your liking. for i,v in pairs(Model) do v.BrickColor = BrickColor.new(1004) wait(1) v.BrickColor = BrickColor.new(1003) -- Really black end