Well these tips are nice but I don’t think it helps me much, in combat system there are a lot of challenges such as the server replication on client causing on some issues only visible on the client (not the server)
I personally use Network Library for remote events, anyway, I think some people use client and Server to handle CFrame andragdolls etc to avoid the Server-Client Delay. I just want to know if you usually do this
Handling SFX on the client allows for smooth and reactive effects and decreases unwanted load on the server.
CFrames can either be handled on server or the client. It is better on the client because it is more responsive but it is harder to replicate and implement.
Ragdolls are usually done on the client.
Damage checks are done on the server for security purposes.
I typically use the Raycast hitbox 4.01 module when it comes to hitboxes. It uses raycasts over BaseParts for hit detection. However, it really depends on what you favour more in terms of performance. Raycasts are more memory & processing expensive over traditional BasePart hitboxes but provide a more accurate form of detection than BaseParts. I should also mention that the raycast hitbox module is primarily for melee attacks, it’s not ideal for objects/attacks that have a large surface area.
Creating smooth attacks, in my opinion at least, depends on visuals. No matter how well optimized your code is, if the animation looks sloppy/choppy it will look poorly made. Of course, code performance is still important but so is the user’s experience. I would highly recommend using the raycast hitbox module (mentioned above) to create accurate hitboxes, as raycasts are not limited by Roblox physics like BaseParts.
As for ragdolls, handling it on the client is ideal as Server-Client replication sometimes has latency issues leading to a player’s character being frozen in place briefly which is not helpful at all.
I personally avoid M1 priority as it’s heavily latency related, the most I would do is determine which player fired the first hit event to determine M1 priority. Giving high-latency players an M1 advantage may cause frustration for players fighting against them. If this is truly an issue, I suppose you can circumvent the problem by simply teleporting players to their closest server to reduce player latency.
In terms of creating hitboxes on the client or server, it really depends, once again. If you decide to create hitboxes with BaseParts, it would ideally need to be handled on the client due to server latency issues with BaseParts (not only for hit detection, but for also inserting the hitbox at the correct position when an attack is used). Same goes for a raycast-based hitbox as raycasts are expensive for server performance. Of course, the client should never be trusted so you will have to implement security checks for example, determining the distance at which the player hit another player to prevent extended hitbox cheats.
Lastly, for knockbacks, I don’t really have much advice for which one to use, each have their own purposes, so I suppose you should experiment with each to determine which one best fits your needs.
Sorry, I should have made this a bit more clearer in my post! Handling ragdolls on the client is ideal for the reason mentioned in my previous post, as for how you would go about this, you would want render to the ragdoll on each client, opposed to rendering the ragdoll on the server and have that replicated to clients, as this completely removes server latency affecting the client visually when it comes to rendering ragdolls as there will be no external factor (the server) and will solely rely on the client’s processing power.