Alright. So I'm making an attack script, as it stands it spawns a block on you and rapidly changes its CFrame and Size.
The issue that I'm facing is that this thing hits things at breakneck speeds. I'm talking 1700+ hit detections in a second. So I debounced it and it's working ok now. But now I need to find a way to make it so that it only hits people it hasn't hit before.
It needs to be able to hit everyone within its area, but it also can't lag the game out and can't hit the same person twice within 3 seconds
I figured out a temporary solution by doing this : https://pastebin.com/EhS1atL3
However, I sincerely need someone to help me make this more efficient and to tell me what makes it so inefficient so I'm leaving the question open in hopes of that.
If someone can make a nicely cleaned up version of what I'm trying to do here, I'll send some ROBUX their way.