Something's wrong with this script... I'm not sure what

My script doesn’t seem to work right. It’s a script for damage for a projectile. This is the script:

trigger: when unit starts touching projectile
 if projectile type of (last touched projectile) == (projectile name)
  then do: if (( (owner of last attacking unit) ) is hostile against (owner of (last attacked unit) ) == true
   then do: set (entity attribute) of (last touching unit) as (((entity attribute of (last touching unit ) )) - (5)
   else do: none
  

Try replacing last attacking unit with source unit of (triggering projectile) and replace last attacked unit with triggering unit

Oh yeah, wonder why I forgot about triggering unit.

well Kyle is right using triggering unit it better but the owner of item source of last triggering projectile is not neccicary