|
| 22 Apr 2017 09:50 AM |
for i, v in pairs(script.Parent:GetChildren()) do local e = v.Name:sub(1,4) == "Part" -- Looks for the brick that has the name"Part" e.BrickColor = BrickColor.Red() end
I don't understand how I got the script wrong. Please help me.
Thanks NICKIMINAJQUEEN0
|
|
|
| Report Abuse |
|
|
iiNemo
|
  |
| Joined: 22 Jul 2013 |
| Total Posts: 2380 |
|
|
| 22 Apr 2017 09:53 AM |
for i, v in pairs(script.Parent:GetChildren()) do if v.ClassName == 'Part' then v.BrickColor = BrickColor.new('Red') end end |
|
|
| Report Abuse |
|
|
| |
|
|
| 22 Apr 2017 10:11 AM |
--Checks the name instead of ClassName, just in case that's what you need. for i, v in pairs(script.Parent:GetChildren()) do if v.Name == "Part" then v.BrickColor = BrickColor.new('Red') end end
|
|
|
| Report Abuse |
|
|
|
| 23 Apr 2017 12:00 PM |
| k, is there a way I can turn that into a variable? |
|
|
| Report Abuse |
|
|