Wow, thats much more than a simple demo. That’s incredible. Did you also do the design??
Well, for a moment I thought you had already used a tween or animation. It looks a bit like that because apparently the character’s rotation is interpolated, instead of just flipping when you set a new CFrame. To be honest I’m not exactly sure about how or why this happens.
A character animation would be relative to the humanoidrootpart. Perhaps using an animation to face in the other direction instead of rotation the humanoid rootpart might work, but it would double all your fighting move animations. I’m not exactly sure, but perhaps doing this locally on both clients would make the rotation look better. However, again, the local animations to your own character would stream to the server and then to the other clients, potentially causing interference.
I can’t say if it would be a solution, it would be a bit hacky in any case.
In general, dealing with latency often involves tricks. Often it is a game of tradeoffs. On the one hand you want speed, control and accuracy, and you need to ensure a smooth and fair gaming experience and game security. But on the other hand, the slower and the less interactive with the server and other players your game is, the easier it is to hide the latency.
For example, a full client-side battle against AI doesn’t need to have latency. But even then you don’t want players to cheat, so some interaction with the server is required. Many games use ‘delayed actions’, such as an ability that charges for a moment before it actually deals damage: the game can use this charging time to already send the message to the server and other clients, to prepare for a more synchronous damage event. There is an endless supply of tricks in the industry, but pvp arcade fights are notoriously hard because the game is so centered around quick reflexes.
To block a hit, like in the old multiplayer actual arcade games where both players play on the same device, is actually really hard to do online, as there is no way around the latency. It’s almost impossible for the clients to stay synchronous, and in fact, many games focus on matching the results rather than synchrony. They create their game so it doesn’t matter if a hit lands earlier or later, as long as the outcome is the same.
Using tricks and approaches like that, it may be possible to create a smooth fighting experience over the net. There are different avenues, such as letting each player do a lot ‘by themselves’ locally (reducing the interaction but allowing smoother fighting) or just pushing everything to the server and letting the server work out what actually happens when and flatly stream that back to all clients (probably difficult to make it seem very responsive). They are all tradeoffs, aided by clever tricks and animations/effects to hide the latency. It’s a big field with interesting challenges for programmers of any level. But be careful not to dig too deep, it’s easy to get lost in complexity and limit yourself too much by the tricks you came up with.
Well that’s the best I can say about it, I think this project looks really really awesome and I really hope you will get to find nice ways to make it work out smoothly. Even without any measures against latency, I would probably want to try and play it. In any case I think you have a lot of talent and that your games will have a lot of potential. Good luck!