Trying to delete hitbox of the enemy in a combat system

  1. What do you want to achieve? Removing double-hitting so m1s are true
    so to quickly explain what i mean by that u can look at any game on the front page with close-range combat, if u were to try to hit each other at the same time, only the first person that started the hit animation first would be the one who would hit the enemy.

  2. What is the issue? (double hitting each other which makes m1s untrue) (note im using region3)

  3. What solutions have you tried so far? Deleting the hitbox of the enemy

Wouldn’t adding a debounce be the solution to your problem here?

1 Like

I have the same thoughts as straykevin, a simple debounce should fix any problems with hitting multiple times, and if you really want you can just make value in the script and the part will only “hit” anything one time, something like this

local AlreadyHit = false
 if AlreadyHit = false then
  AlreadyHit = true
  --Deal damage and whatever else
  --If it already hit something then it can't hit anything else.
1 Like

Made a check for stun right above the hitbox spawn script