Client Synchronization can be a pain, especially when you want them to all be in sync together (Lerp on Client). But, I need help with this one.
How can I make it so where a moving elevator is in sync with the rest of the clients. For example, if the player1’s elevator moves from station 2 to station 3, and a player joins in the middle of this, how am I able to make the second player see this movement as well.
What is the best way for a synchronization effect in most cases? How can I make this work?
Basically make the elevator just exist on the client, and if someone gets in with you, clone their character and weld it, and make the real one invisible, then when they get out just delete the clone. Maybe play a short getting out cut scene?
I assume there’s only going to be one elevator (or a set of elevators) for the entire server, not one per player.
Control the position of the elevators from the server as a value, and listen to changes to that value on each client. Interpolate the elevators clientside based on the serverside value. Then you ensure they are all quite synchronized.
Alternatively, once the doors close, you can teleport players from the moving elevator car to a stationary one and teleport them back once the moving car reaches the specified floor. Or the “moving” car simply teleports to the next floor with everyone inside teleporting as well when the time is right for it to arrive.