Issue Type: Performance
Impact: High
Frequency: Constantly
Date First Experienced: 2021-05-01 22:05:00 (-07:00)
Date Last Experienced: 2021-05-18 10:05:00 (-07:00)
Reproduction Steps:
- Open the repro file and open the Animation Edtior, clicking on the Dummy. Export the animation and put the AnimationId in the Animation located in ReplicatedStorage.
- In ServerScriptService, enable either ClientVersion or ServerVersion, ClientVersion will play the animation on the client controlling the character and ServerVersion will play the animation on the server.
- Open a server with 2 test players, or play with another person in an actual server
- Watch the animations and compare your animation and the other person’s animation. You will notice as the animation progresses the other client’s animation gets more and more desynced.
Repro File: AnimationRepro.rbxl (42.4 KB)
The test server was run on:
CPU: Intel i7-8750H @ 2.20GHz
RAM: 16GB DDR4 2666 MHz
GPU: NVIDIA GeForce GTX 1070
However, this is also happening on live Roblox servers.
Expected Behavior:
I expect that when the animation is playing, the other clients will see the exact same thing as the current client at any point in the animation, especially when the animation is paused/the speed is set to 0. I would expect the differences to be within margin of error, of course, and the animation to not get farther and farther apart as it progresses. This animation is a simple arm going up and down, and I expect the arms to stop somewhere close to the up and down position, not at a 90 degree angle. Any keyframe/marker events that are fired should also be fired at the exact point in the animation, not before the animation reaches that point.
Actual Behavior:
As the animation progresses past about 2-3 seconds, the events on the server, if played on the server, will fire at a completely different time than what the clients see. If played on the client, the animation will only look correct for that certain client, but progressively get more desynced for other clients as time progresses. This makes any animation that is longer than 2 seconds look atrocious, especially for animations that are paused or use events to modify the character. For example, if I weld a part to someone 5 seconds after the animation played at a certain event, the weld will be too early and look completely off.
Without me trying to fix it myself, this is an example of what you can expect to see on different clients. The 1st window is the server, the 2nd window is the player on the left, and the 3rd window is the player on the right:
Ignoring the 30 fps the video was recorded at, you can see the animations very desynced. I’m aware only 10 animations can play at once which has caused issues in the past, however the Animate script is disabled and replaced with a blank script, and no other animations are playing.
It is important to note that the animations work fine when they are 1-2 seconds long, which most animations are. However, long and complex animations longer than 2 seconds experience this issue, and it’s not feasible for me to split my animations up into 8 different animations or so. This issue happens both in live servers and in play test or test servers.
Workaround:
When I try to create a workaround, it’s still very desynced. I haven’t spent a lot of time trying to find a workaround as this is the best solution I thought of, so I put a quick messy script together and my idea didn’t work consistently. It basically just sets the time of the animation on the server to the time on the player’s client so that everything will pause at the same point. However, this makes the animation look very choppy and is not acceptable.
Attempted Workaround: