BattleFront2's script will only decrease health (that or be inefficient). This is a (very slightly) better version
function onTouched(hit)
local h = hit.Parent:findFirstChild("Humanoid")
if h~=nil then
h.Health = 0 --Here is where it gets more efficient (one less memory check)
end
end
script.Parent.Touched:connect(onTouched) |