I was trying to make a script where when the zombies killed the arms don't kill you when dead. Heres what I got,
local Zom = script.Parent local Health = Zom.Humanoid local arm1 = Zom.zarm1 local arm2 = Zom.zarm2 if Health == 0 then arm1.damage2.Disabled = true else arm1.damage2.Disabled = false if Health == 0 then arm2.damage1.Disabled = true else arm2.damage1.Disabled = false end end end
Use the died function and :Destroy()
to destroy the scripts.
local Zom = script.Parent local Health = Zom.Humanoid local arm1 = Zom.zarm1 local arm2 = Zom.zarm2 Health.Died:connect(function() --When the humanoid Dies arm1.damage2:Destroy() --Destroy this script arm2.damage1:Destroy() --And this one. end end end)