HitboxClass | v1.1B | A Powerful OOP-based Hitbox Module

can i create multiple hitboxes instead of re-using one?, so my code won’t bug

Re-using one is less buggy. So here is the question.
Is creating, using and deleting hitbox better or creating one, activating and disactivating hitbox multiple times is better.
I do not know what you are referring to, but if the hitboxes are different(size, position) then you of course need to make new. When they hitboxes are the same you just need to activate and disactivate it few times

1 Like

Maybe, but , i asked that because, i want multiple sizes hitboxes and destroy them when finished using then, or another scenario, when i have a certain speed time, i need to create hitbox fast as i can, reusing a hitbox i don’t think it will fit on my scenario

Does someone have the same problem than me or is this just idk for me…

and like for the devs sometimes the hitbox still hits like after the bug happens but like in 1 in 10 hits

I need more information to help you.

For example you have tools with abilities:
Like you could make few hitboxes if player has a tool, and when different Move is used, use that hitbox. (It can be used for basic attacks, skills)

So basically i need making/using a hitbox fast as possible many times, because i have a “ability” that does this, won’t the hitbox bug ?

What is that ability? Name and description please

Punch barrage

This text will be blurred

Almost all developers are using one hitbox. It is very optimized. If you worried about accuracy, you can make it accurate through size. And if you use that way, this Module is made for that

my problem is not accuracy , my problem is if the hitbox will support if it desactivates and enables that much times, and very fast

For that you do not need to disactivate it. In hitbox parameters you can choose delay between hitbox hits. It is easy

1 Like

do you have any example code for this?

i was thinking on something like this

while task.wait(0.05) do
     hitbox:Enable()
     task.wait(0.08)
     hitbox:Disable()
end

Change DebounceTime. 1 means that it will get targets every 1 second. DebounceTime = 0.05 or 0.08

Alright thank you, also, other question, do you know how can i set the hitbox to detect only 1 character, or more than 1 ?

Btw, the method I told you is not going to work every 0.05 seconds, because module uses RunService.Heartbeat and minimum time for deltatime is 0.1-0.2(Idk much, but around that).
I think you need to do that:
Use hitbox not for damage. When hitbox hits, disable hitbox and for the first target use “for i” loop for damage every 0.05 seconds

1 Like

thank you, another question, do you know how can i make the hitbox constant?, or is it already constant by default?

It is already. This is Hitbox module for continuous usage

hey i don’t know if you are still replying, but i have a issue where getting the character from the table makes an delay of 0.3s appear before it continues, whats the best way of getting hit characters?

I haven’t had problems with this module for a long time