If I wanted my player to use a bat or a sword, how would I make him hit an enemy with a bat?
I do know how to do guns and bullets, that's easy.
Develop games in your browser. Powerful, performant & highly capable.
Common way is I think to have a spite animation of him attacking with a sword and then when the animation hits a certain point and the player is colliding with an opponent, trigger the damage etc.