script.Parent.Touched:connect(function(hit)
if (hit.Parent:findFirstChild("Humanoid") ~= nil) then
hit.Parent.Humanoid.Health = 0
elseif (hit.Parent:findFirstChild("Humanoid") == nil) then
return
end end)
This would be the bullet script. All you would have to do is splice this into a gun of your choice. This would kill all zombies, and humans I guess, does this matter? Is it does, this would kill only zombies:
script.Parent.Touched:connect(function(hit)
if (hit.Parent:findFirstChild("Humanoid") ~= nil) and (hit.Parent.Name == "Zombie") then
hit.Parent.Humanoid.Health = 0
else return
end end)
|