I have created non humanoid custom character that is created and controlled in a local script. I now want to sync this character so that it can be viewed by all players in the game and I was wondering what the best method to do this was.
-
I first tried sending the position and orientation of the parts to the server using remote events and updating a replica of the character in the servers workspace. This works however to make it smooth I have to send a lot of remote events which ends up sending a lot of data. A lot of data is also sent back to the other clients from the server and gets worse the more players that join which is not ideal.
-
My second attempt was to keep all characters in the server workspace and use SetNetworkOwner on all the parts of the character. This worked and used much less data but now I have a problem where parts of the character randomly move up and down as seen in video below:
Does anyone how I can either:
a) Reduce the amount of data sent and received in my first method (currently sending the position and orientation of each part in a array)
b) Fix the parts moving about in the second method
c) A different solution to my problem
Any help is greatly appreciated
Edit:
Update for anyone that find this post and has the same problem I’ll write my solution:
Each client sends a array of the parts cframes every 0.1 seconds. These go to the server and straight to every other client. This client then lerps each part between the current position and the updated one. Obviously this isnt perfect but its a good starting point