In my game, there is many movements and melee attacks. However, moving melee attacks will cause the hitbox to lag behind the player, and, make it harder for the attack to hit + way unaccurate. I know this is because of the Server’s movement ghost, but its really difficult to find a middle ground or way to make this system work properly.
My hitbox system uses magnitude and cframe checks (incredibly server efficient)
Everything in my game is optimized, to the point of 30 players in a server with little to no server decay.
The attacks and everything tend to work way better when less movement is involved.
oh well im sorry i was just trying to say how you could make a offset part and make a weld before running and place it in storage to make custom offsets with ease then we script a weld and weld it to our offset!
It would be better to create your own hitbox system.
That usually seems to be a more reliable source for fixing bugs like this.
It may be tedious, but that’s one of the main “perks” of scripting.
I think subtotal might be right have you tried using runservice and then casting those positions to the server through a event?(also im still drawing in ms paint)
Ok so this all should be more or less done by the server the from client to server with a remote event containing functions so a big class container holding these funcitons for hitbox vis and hitbox collison!
It doesnt run on a loop. It runs an individual frame. Each hitbox exists to the point of that frame and a few seconds after to give an idea of what went down
I do use my own hitbox system, created by me. I made it because most open sourced hitboxes are unfit for my game and contain unusually large amounts of unoptimization or jank
To explain whats going on in the server more in depth, it loops through all alive entities, then creates a box with magnitude and cframe cuts, then checks if targets humanoidrootparts are within, and if they are, return true
Hm. ̶I̶ ̶d̶o̶ ̶n̶o̶t̶ ̶u̶n̶d̶e̶r̶s̶t̶a̶n̶d̶ ̶t̶h̶e̶ ̶n̶a̶t̶u̶r̶e̶ ̶o̶f̶ ̶y̶o̶u̶r̶ ̶s̶y̶s̶t̶e̶m̶, but I assume server lag is the cause. Optimize your scripts and that should work better.
You could also create a hitbox that is the size of the attack area and have that be the hitbox instead of constantly updating it to match the player’s position.