So i currently use the touched event during an animation, using hit(first parameter of touch event) is how i deliver the damage but sometimes hit.parent is the caster of the punch making the player who punched take damage. Can i somehow prevent this? Sorry for no script
You can pass the caster as another parameter to the script, then check if the hit.parent is the same as the caster you passed as the paramater.
function dealDamage(hit, caster) if (hit.Parent ~= caster) then --damage end end