Combat System help/guide

I am new to combat systems and I am trying to make one currently to improve my front end skills. Like melee, and sword combat systems., but I don’t know how I should manage the client-server communication in combat systems. How can I do the logic for it and make the combat system as clean as possible and make it perfect

I just want an explanation and tips, I don’t want any script or anything, I’m just confused on how to manage client-server communication in combat systems with remote functions/remote events and how they work.

4 Likes

Handle all collision on the server for purposes of verification and dealing damage. On the client side, I believe animations replicate automatically, so you can just weld the weapon onto the player from the server and then use the client to play animations. The animations will have no lag on the client and still properly replicate to the server.

3 Likes

all animations should be played on the client, all collision detecting & hitboxes should also be in the client and you should just do sanity checks on the server to verify them, you should only use 1 remote event, all VFX (particle emitters, tweened parts) should be done first on the client then replicated to other players’ clients
thats how you make the smoothest combat system.

4 Likes