lordyoman
|
  |
| Joined: 10 Jun 2010 |
| Total Posts: 426 |
|
|
| 12 Jul 2012 08:27 AM |
model = script.Parent
for _,v in pairs(model:GetChildren()) do if v:IsA("BasePart") then v.Touched:connect(function(part) if not part:IsDescendantOf(model) then if (part.Name == Bullet) and (script.Parent.Health.Value > 0) then script.Parent.Health.Value = script.Parent.Health.Value - 2 end end end) end end
Sorry there is no output! |
|
|
| Report Abuse |
|
|
|
| 12 Jul 2012 08:31 AM |
model = script.Parent for _,v in pairs(model:GetChildren()) do if v:IsA("BasePart") then v.Touched:connect(function(part) if not part:IsDescendantOf(model) then if (part.Name == "Bullet") and (script.Parent.Health.Value > 0) then script.Parent.Health.Value = script.Parent.Health.Value - 2 end end end) end end
You should really learn to put ""'s around your names. :P
--TehChikenHater ლ(ಠ_ಠლ) |
|
|
| Report Abuse |
|
|
lordyoman
|
  |
| Joined: 10 Jun 2010 |
| Total Posts: 426 |
|
|
| 12 Jul 2012 08:35 AM |
| Haha wow... Thanks for the help! |
|
|
| Report Abuse |
|
|