Kondou
|
  |
| Joined: 05 Aug 2012 |
| Total Posts: 1148 |
|
|
| 19 Feb 2013 04:17 PM |
How would I go about it besides going
brickone.CanCollide = true bricktwo.CanCollide = true
And so on, basically change a property of a lot of bricks in a model without having to type a line for each brick. |
|
|
| Report Abuse |
|
|
|
| 19 Feb 2013 04:21 PM |
for i,v in pairs(the model you want:GetChildren()) do if v.className == "Part" then v.CanCollide = true end end
that should work if you name "the model you want" correctly. ~Born2Lead |
|
|
| Report Abuse |
|
|
Kondou
|
  |
| Joined: 05 Aug 2012 |
| Total Posts: 1148 |
|
|
| 19 Feb 2013 04:57 PM |
I made this script which would change the bricks in the Grass model to the designated color in 20 seconds, then to another, but it doesn't work...
while true do wait(20) for i,v in pairs(game.Workspace.Grass:GetChildren()) do if v.className == "Part" then v.BrickColor = BrickColor.new("White") wait(20) v.BrickColor = BrickColor.new("Dark green") wait(20) v.BrickColor = BrickColor.new("White") end end end
Did I miss something? |
|
|
| Report Abuse |
|
|
|
| 19 Feb 2013 05:50 PM |
while true do wait(20) for _, v in pairs(Game.Workspace.Grass:GetChildren()) do if v.ClassName == "Part" then v.BrickColor = BrickColor.new("White") end end wait(20) for _, v in pairs(Game.Workspace.Grass:GetChildren()) do if v.ClassName == "Part" then v.BrickColor = BrickColor.new("Dark green") end end end |
|
|
| Report Abuse |
|
|