How can I make this script everytime the brick is touched if they don't have ZAnimate in there Character they die. It works only 1 time then it breaks or something
function onHit(hit) local human = hit.Parent:findFirstChild("Humanoid") if not hit.Parent:FindFirstChild("ZAnimate") then hit.Parent.Torso:remove() end end script.Parent.Touched:connect(onHit)
function onHit(hit) local human=hit.Parent:findFirstChild("Humanoid") if human then if hit.Parent:FindFirstChild("ZAnimate")==nil then hit.Parent.Torso:remove() script.Parent.Disabled=true end end end script.Parent.Touched:connect(onHit)
If the problem is still going, it's probably because of "script.Parent.Disabled=true".