Should Melee Hitboxes be done in client or server?

Self explanatory,

Should melee hitboxes be done in client or server and is there even a difference. I first started doing it on client but then I saw people making it on server and I tried it too. Maybe client is bad for ping suffering people.

2 Likes

If it’s made on the client, it’s exploitable. That’s probably why people prefer doing it on the server.

1 Like

Server is generally better because the client is exploitable

2 Likes

it depends.
if you’re making a multiplayer pvp game, then melee hitboxes ahould absolutely be done on the server.
but if you’re making a single player game, then melee hitboxes should be done on the client. if an exploiter messes with the hitboxes in a single player game, they’re really ruining the fun for themselves, and not meddling with anyone else’s experience.

2 Likes

this depends on what you mean by doing melee hitboxes on the client or server.

you can do damage on the server, and place the hitbox in front of the character on the server. however, the position of the character can be exploited since the player has control over the position of their character. so this doesn’t make it impossible to exploit. this would be a matter of implementing anti-noclip and anti-teleport. just think about what variables are in control of the server and what variables are in control of the client.

also remember, Roblox implemented Hyperion a while back which is an anti-cheat. the likelihood that someone will exploit your game is lower now. I’d focus on ensuring that you just keep your scripts secure by making sure non-constant (or better, all) variables on the client end don’t have consequences for the server, i.e ammo counts and anything that’s replicated to the server (variables the client sends to remote events/functions, character position, etc). if you do that, you’ll most likely be fine.

1 Like

I would do server no matter what. UserInputs go from client to server so you already have the script connected to the server. Having it backtrack to the client again just to calculate a hit seems unnecessary.

1 Like

Got it. So server is the way to go for multiplayer.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.