I am making game and I am using sword as a weapon so I have created a script and detect hit by collider of sword to deal damage but I am getting problem that it is dealing damage whenever sword collide with enemy collider even if player is not in state of attacking suggest me a script for melee attack damage
Asked
Active
Viewed 217 times
-2
-
1Please provide enough code so others can better understand or reproduce the problem. – Community Oct 23 '21 at 18:26
1 Answers
0
You should provide more code / resources for us to properly evaluate the issue. Although, I think I get what your problem is. You should disable the collider when the character is not attack. This will stop any accidental triggers happening when not in combat.

AniOptics
- 81
- 5