mage11561
|
  |
| Joined: 03 Sep 2008 |
| Total Posts: 13217 |
|
|
| 13 Dec 2011 04:28 PM |
for i=1,50 do snow = game.Workspace:FindFirstChild("Part") if snow.BrickColor == 1 wait(.5) snow.Name = "Snow" end end
This is supposed to change the name of any Part in Workspace with the BrickColor of 1 (AKA White) to "Snow", but it doesn't seem to work. Any help? |
|
|
| Report Abuse |
|
|
|
| 13 Dec 2011 04:35 PM |
Sorry for not helping to much but I can't think of how to explain it without creating a new script.
for Num, Obj in pairs(game.Workspace:GetChildren()) do --Gets All In Workspace. if Obj:IsA("BasePart") then --Checks if object is a part. if Obj.BirckColor == BrickColor.new("White") then --Checks if part is white. wait(0.5) --This was in your script? What is it for BTW? Obj.Name = "Snow" --Change The Name end end end
PM me if you need a better explanation. |
|
|
| Report Abuse |
|
|
|
| 13 Dec 2011 04:37 PM |
1 is not a BrickColorValue Try BrickColor.new(1) in exchange for 1.
|
|
|
| Report Abuse |
|
|
mage11561
|
  |
| Joined: 03 Sep 2008 |
| Total Posts: 13217 |
|
|
| 13 Dec 2011 04:59 PM |
Thanks, I thought you only used BrickColor.new if you were changing the Color, thanks :D |
|
|
| Report Abuse |
|
|