I cannot find the answer to the question anywhere else, as all searched results are just the common “server vs client animations” or just TweenService VS Animations in general.
When BOTH are used wholly on the Server, which costs more to use: Tweens or Animations?
Apologies if this is not the correct Category, I do not use the DevForum often and no others seemed to fit.
Tweens are more expensive as they have to be calculated during runtime while animations are precomputed through “baking”. However, the overhead is negligible.
Tested with a microprofiler, here’s some interesting information:
Tween updates seem to be batched every heartbeat step (.Heartbeat), after a physics step (.PostSimulation) and before render step (.PreRender or .RenderStepped). It runs serially aka on one worker thread.
On the other hand, animation updates Transform property updates run in parallel aka different worker threads at the same time, running on a physics step (I believe .PreAnimation as the animation updates before .PreSimulation or .Stepped).
This is from my understanding, correct me if I’m wrong.
The animation and tween updates I mentioned above only update the properties. It is only seperate jobs such as applyJointTransforms that actually apply the updated properties into instances. Animations support throttling (workspace.ClientAnimatorThrottling) but tweens do not. Furthermore, animation updates run on parallel which may help.
Animations may in fact be a more performant solution (assuming you’d want to tween the same amount of joints as a regular animation would), but you will have to test.
But of course, always go for clientside animations when possible.