zaniac10
|
  |
| Joined: 18 Aug 2009 |
| Total Posts: 10000 |
|
|
| 28 Sep 2014 03:33 PM |
I have a script and it's not turning their limbs blue like it's supposed to. Here it is. I can't find out what the problem is. Probably just me being a dumb scripter lol. -------------------------------------------------------------
function onDamage(Part) if Part.Parent:findFirstChild("Humanoid") ~= nil and Part.Parent.Name ~= "script.Parent.name" then for i=1,10 do wait(0.05) Part.Parent.Humanoid.Health = Part.Parent.Humanoid.Health -1 Part.Parent.Humanoid.WalkSpeed = 12 j = Part.Parent:findFirstChild("Right Leg") if j then j.BrickColor=BrickColor.new("Light blue") end x = Part.Parent:findFirstChild("Left Leg") if x then x.BrickColor=BrickColor.new("Light blue") end m = Part.Parent:findFirstChild("Right Leg") if m then m.BrickColor=BrickColor.new("Light blue") end l = Part.Parent:findFirstChild("Right Leg") if l then l.BrickColor=BrickColor.new("Light blue") end
wait(1.5) Part.Parent.Humanoid.WalkSpeed = 16 wait(0.05) end script.Parent:remove() end wait(0.025) end
script.Parent.Touched:connect(onDamage) |
|
|
| Report Abuse |
|
|
zaniac10
|
  |
| Joined: 18 Aug 2009 |
| Total Posts: 10000 |
|
| |
|
| |
|
| |
|
|
| 28 Sep 2014 08:38 PM |
Just do this instead:
for I,v in pairs(part.Parent:GetChildren()) do if v.ClassName == "Part" then v.BrickColor = BrickColor.new("Light blue") end end
|
|
|
| Report Abuse |
|
|
|
| 28 Sep 2014 08:39 PM |
for I,v in pairs(Part.Parent:GetChildren()) do if v.ClassName == "Part" then v.BrickColor = BrickColor.new("Light blue") end end
* |
|
|
| Report Abuse |
|
|