Lag prejudicating remote event response

I’m developing a combat system that uses client-side hitboxes.

I’m facing an issue related to player ping. When a player’s ping is slightly higher than usual, the server responds very slowly.

I’ve already tried switching the hitbox system between server-side and client-side, but nothing solves the problem.

Any solution would be greatly appreciated.

There is no solution to this problem. You could try showing the stun on client first, then replicate it on the server, but it would be hard and unreliable, and it won’t look smooth for all players. Other multiplayer combat systems on Roblox face a similar issue.

The best solution would be to edit the animations to hide the fact that the hit for the other players is late. You could play the sounds on the client to make that instant, at least.