Setting up the damage the way I suggested should work.
I use raycasting rather than projectile but the results should be the same.
You might want to make a new post for the projectile spawning,
as it’s not directly related to the original question. But,
the damage/death code should be called on your projectile,
when it hits the player. Not on the player, you don’t shoot players at bullets.