Basically I was wondering how I would make the movement of the player’s torso reproduce on the server, I looked for tutorials and I saw that it was modifying the 6D motors of the player character’s torso, I saw that to reproduce it on the server you have to send remote events every time change the position of the torso. I personally thought that it was not very optimized, that’s why I ask you. Is it optimized? What aspects should I take into account to avoid lagging
now I will tell you an option that I was thinking a few days ago
As everyone knows when an animation is loaded on the humanoid from a local script it is loaded on the server automatically, by things and systems…so I thought of making an aiming animation that moves from top to bottom to simulate the change of perspective, it will play the animation, and as the player moves their camera the animation is positioned on the timeline that corresponds to where the torso is looking.
I want you to tell me what you think, and according to you: What is the best way, how should I do it, what examples do you give me?
edit: in case you don’t understand (which is most likely) I mean that when the player moves the camera the torso and head look in that direction
My game is about shooting and I need that when the player shoots, the body is pointing to that place so that the bullet does not come out strange. Also, for the best appearance, but the question here is which of the two options is the best
Honestly… I’m dumb to explain. I know how to make the torso move. (Simple) but I need to know how or which of the two examples I gave is the best to make it replicate on the server
No brother you are a little confused. The animations uploaded by a humanoid are replicated on the server, but when you modify the 6d engines through a local script, nothing will be played on the server, the only way it will do it is to send a remote event every time there is a change. tell me what you don’t understand
make the client set the Motor6D offsets and tell the server to tell the other clients to do the same thing. It doesn’t need to replicate to the server, it only needs to replicate to all of the other clients so they can see it. It’s the most optimized and safe way.
Putting it on the server is a bad way about this. It just causes unneeded lag. You have to do network compensation which takes awhile with GetServerTimeNow etc. Didn’t read it but you can look up things