Ok, so I am making a game that uses a lot of physics calculations every frame, and this is done on the client side as it is the character that is actually the one having these physics calculations done on them. I use the calculations to determine where the character should be placed for the next frame. However, since the character gets CFramed, their position is not updated to the server. It is a multiplayer game, and I want the player to be seen and be able to see others while being CFramed. I am not sure the best way to go about having the server also see the changes that are being done on the client while not causing lag.
Has anyone else had a similar problem or does anyone know how to get the player position to update on the server?
OK, I have found a solution to the problem in a way. It turns our that parts that are anchored on the client are not replicated at all on the server, so since the character is controlled by the client and since I anchor it on the client, no updates are sent to the server. I just had to unanchor it and use this every frame to counteract gravity:
self.rootPart.AssemblyLinearVelocity = Vector3.zero
self.rootPart.AssemblyAngularVelocity = Vector3.zero
found in this post:
CFrame not replicating while character is anchored - Help and Feedback / Scripting Support - DevForum | Roblox
4 Likes
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.