Creating the hitbox on the client and handling networking manually would have its benefits if the game’s architecture intends to handle everything about the combat in the client and simply handle sanity checks and damage on the server since there’d be no lag in creating the hitboxes when needed, which is normally made because the server needs to ping to the client to start the hitbox.
For the second question, I’ve had no issues with it so far, but I imagine if the combat is abnormally fast, handling the hitboxes solely on the client, along with likely the rest of the combat, would be ideal in that case.
You’re probably using a client-sided hitbox which yields the code till it gets a response from the client. If you’re not, then that’s an issue not related to the module.
Is the red box where the character is on the server and other clients? If so then you should probably either keep the hitbox the same or predict the character’s position too and not just the hitbox.
The idea is to improve responsiveness for the person the hitbox is for by having it line up better with what they see on their screen. It uses the velocity the server sees in order to predict the character’s position on that player’s client.
RPGs and Fighting Games are what come to mind, where areas of space would likely be used in an attack (like a fireball or a punch), you could use this for your melee attacks. For an FPS game, I’d recommend FastCast for your guns.
I call :Stop() after the swing animation reaches the “SwingEnd” animation marker. Another example of this happening is when the taunt animation reaches the “Spit” animation marker, turning on debug shows the hitbox disappearing, but then walking in front of a player causes the healing effect to activate, even after the hitbox dissapears
hi i was wondering if you forgot to update the HitboxClass.rbxm file in the github for v1.1B, it still shows me the 1.1A inside the script and the object touched still doesnt seem to work with it
I have a very big problem making a combat game
I used Client-Mode in hitbox settings (is in server script so that might be the problem)
and One player can only Damage?
They have been plaguing my Roblox game for a while now, whenever a script that makes a hitbox gets destroyed within the lifetime of a hitbox (The debris thing) the hitbox’s part and array that holds it’s elements never get deleted ever, like at all. If you could provide a solution that would be very awesome!
If you’d like, dm me some example code of how you’re deleting things. I’m deleting a script spawning the hitbox and the hitbox still destroys itself just fine. Might be a memory management issue on my end or I can see if I can help you figure out what’s up.