Do damage only while punching, not while walking into the enemy?

I have a Box collision around my fist on my char, and generate hit event for when the box hits my enemy, the enemy is killed. But problem is, whenever I walk into the enemy and the fist connects with the enemy he also dies. How can I make it so he only deals damage when he punches instead of just walking into the enemy.

enable collision only when attacking and disable after

Yep, no freaking idea why I didn’t think of that simple fix. Thank you!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.