Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Area of Effect attacks/Hit Debouncing?

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

2 comments

0

I figured out my own solution, in case anyone wants to take and mutilate the code if they have issues:

1 answer

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.