|
| 28 Nov 2013 09:14 AM |
| Hi, so what i want is that, for example, i have made a model called "PartPack" and inside it has 25 parts, with all of them named "Part", so i want to know how to get all o this parts at one time and color them Bright Red, so its less time consuming. |
|
|
| Report Abuse |
|
|
|
| 28 Nov 2013 09:20 AM |
you could do: local parts = (PartPack Location):getChildren() for i,v in pairs(parts) do parts[i].BrickColor = BrickColor.New("Bright Red") end
I did this quite quickly so i may have messed up somewhere. |
|
|
| Report Abuse |
|
|
|
| 28 Nov 2013 09:22 AM |
And just in case something is in there that is not a part you should do: local parts = (PartPack Location):getChildren() for i,v in pairs(parts) do if parts[i]:IsA("BasePart") parts[i].BrickColor = BrickColor.New("Bright Red") end end |
|
|
| Report Abuse |
|
|
|
| 28 Nov 2013 09:23 AM |
| if parts[i]:IsA("BasePart") then* |
|
|
| Report Abuse |
|
|
|
| 28 Nov 2013 09:35 AM |
| Tested it, then realized Its "Bright red" not "Bright Red", so change that and it should work! |
|
|
| Report Abuse |
|
|
|
| 28 Nov 2013 09:48 AM |
Eww parts[i] could just be replaced with v |
|
|
| Report Abuse |
|
|