I have physics doors in my game using hinge constraints. I have a sleep function that anchors the parts in the door when it is not in use for performance which works effectively. The problem is that it is very inconsistent at syncing between client and server. I give the server physics ownership of the parts.
When I freeze my client after using a door, and then switch to the server you can see the difference.
I can’t make the doors client-sided only due to having things on the server using physics which would cause a problem, the problem is they don’t sync with the anchoring system.
Use an input from the client, send it to the server and don’t freeze the client.
Other than that, I can’t help you with more in depth detail of the scripts.
It would be very useful to see the code you’re using, since I’m pretty sure this is happening due to some short of delay when firing the sleep function. If I’m not wrong, the doors moves depending on the hand position?
The door system should have a structure similar to this one:
Interacting with the door - Sending data to the server & unanchoring the door - Stop interacting with the door - Firing the server & anchoring the door
Nah, the client fires a remote to open the door, the door is anchored (woken) depending on a value, which is disabled shortly after a part of the door is interacted with. The problem is when a door is anchored it doesn’t sync with the server, it just anchors it wherever it is on the client.
I even made the door fire a remote to all clients when it is anchored, containg a table of all the parts of the door and their cframes for the client to set, and it still doesn’t solve it.
Hmmmm, you’re creating some short of attachment or Motor6D between the player & the door? There shouldn’t be any problem syncing positions if the attachment was made from the server-side.
Well, I recently had the same problem with a Time Stop script, and I think that the only way to sync the server with the client is by passing a table with the cframes to the client/server.