In this tutorial there's looked into tracing functions for different types of projectiles. Tracing is a reliable way to register damage from all sources, whether it is shooting or slashing.
Here some simple functions of how to implement these are presented.
I hope you can use it in your future projects.