Problem with a combat system

Hello Dev Forum, if I appeal to you it is that I have a problem which is very annoying. I’m trying to create a fist combat system, and since I’m not very good at scripting combat systems, I got help from a series of videos on Youtube (from the youtuber Sushi Master)

Here is the problem, to do damage to opposing players, I use a custom HitBox. First I collect information that I send to a module and then retrieve it in an event.



Here are part of the lines of codes follow the image above:

And then I retrieve them in the same script sends them.

All this to say that my problem is the following. In the module, I use a table that will store the player hit, and then the player takes damage. After a certain time, the list is reset by a timer (task.delay)

When I tested the system with a friend, we realized that at some point, we take damage just by getting close to each other and when the arm hitbox touches.
I don’t understand why it does that, and moreover it’s very weird because it only happens sometimes. (For those who have not understood, sometimes, when we get closer and our arm touches another player, this one takes damage without the first player being clicked.)

(Representation of the bug, when this happens, the dummy takes damage without my clicking.)

So I tried to reset the list that records the players tapped when the player who tapped dies, because I thought it came from there, nothing helped.

I’m open to any help, and if you didn’t understand I can explain in more detail.
NOTE: I apologize in advance for any mistakes that may arise. I am not English by nationality.