Best method to create a hitbox welded to a moving character?

The best way to actually use the hitboxes is by starting the hitbox from the client then sending the hitdata to the server where you can change what you want there.

Here is a clip where the hitbox is rendered from the client

1 Like

Hey. I’ve made the hitbox on client and some anti-exploit checks on server, but I’m not sure how to make a server hitbox.
I’ve tried to make just an anchored server hitbox(green), that is created a bit further the character’s cframe when a client hitbox(red) hits an enemy character:

As you can see, the hitbox is created behing the character.
Second try was making the hitbox welded to the HumanoidRootPart on the server:

Here I’ve also shown what causes both issues - on the server character moves much slower rather on client.
Any suggestions?

1 Like

The server hitbox should be much more lenient. Perhaps you should only make the server hitbox when you actually hit the enemy. You could even pass through the position where it was hit and check the distance to the character, and having the hitbox larger than the client one, it should work consistently and yet still not be too prone to exploiting.

It may be worth just doing a range check on all of the targets hit instead of a hitbox on the server, actually - whatever works best with your system.

Actually, you’re right. Magnitude checks can cause hit targets around and behind the character if the client hitbox is expanded by an exploiter, but that’s not a problem, since the range check isn’t big and there are ways to prevent hitbox expansion. If you still have some suggestions about server hitbox or maybe raycast or client hitbox exploit security, let me know. Thank you for the help!

1 Like