|
| 22 Aug 2013 07:43 PM |
function onTouched(hit) if (hit.Parent:findFirstChild("Hudmanoid")~= nil) then hit.Parent.Humanoid.Health = 0 end end d = game.Players.JoeJoethe1.Character:GetChildren() for i = 1, #c do if (c[i].className == "Part") then c[i].Touched:connect(onCrushed) end exit
|
|
|
| Report Abuse |
|
|
| 22 Aug 2013 07:48 PM |
function onTouched(Hit) local Humanoid = Hit.Parent:FindFirstChild("Humanoid") if Humanoid then Humanoid.Health = 0 end end
local Player = Game.Players:FindFirstChild("JoeJoethe1") if Player and Player.Character then for Index, Child in pairs(Player.Character:GetChildren()) do if Child:IsA("BasePart") then Child.Touched:connect(onTouched) end end |
|
|
| Report Abuse |
|