Damaging multiple humanoids at the same time

So I’m creating a combat script and it’s mostly done, except for this tiny bit problem I only found till now. The script only damages one humanoid then instantly goes into cooldown, preventing the player from damaging multiple which isn’t what I want to do at all. This probably could’ve been easily avoided if I had used raycasting but I was having trouble with it and so went with a toucher + a custom hitbox.

it works fine but I can’t see any other way of making it possible to damage multiple humanoids at once without using region3, switching to raycast or using what my friend told me was, for example, fistHitbox:GetAllParts(), fistHitbox being the name of the custom hitbox I made.

Instead of having a variable as a debounce for the Touched event try using a dictionary with player names so the debounce will just be there to not damage the same player more than once.

Something like this

local debounces = {
  ["thePlayersName"] = true
}
1 Like