Run the code in Runservice .Stepped connection and be aware this will override any existing animations.
If you want to combine it then let me know as that is a different question/problem.
Timing
Motor6D transforms are not applied immediately, unlike updating C0 and C1, but rather as a batch in a parallel job after RunService.Stepped, immediately before physics steps. The deferred batch update is much more efficient than many immediate updates.
Yeah I would like to combine it with animations, the reason I post this is because I had been lerping C0 to creating a tilting effect in the direction of character movement but using transform is breaking the animations, I may just disable warnings in the console as the warning is extremely annoying and spams the entire console unless not fixing this is really going to affect performance.
Otherwise I do not believe it actually impacts performance significantly as most games have done it in the past with C0 animations. I would perhaps postpone and see Roblox’s response on this.
There was a bug report regarding the Motor6D issue that everyone who tilts their torsos has been experiencing…
Motor6D.Transform is a read-only property and should be fixed soon, and one of the Roblox staff said that the warning has been removed, so maybe try restarting studio to see if the issue is gone
Motor6D.Transform is a property on bones that gets used by Roblox animations and are client-sided only.
Animations replicate their data to the server which is why other players can see changes in body part position but if no animations are playing/replicating then changing Transform is only visible on the machine that did it.
While an animation is playing you can NOT use this property as animations will override your values every frame.
If you wish to change the Transform property you must ensure that no active animation tracks are playing.
You might have to delete / disable animations if you want to use it for something else.
It’s more efficient than setting C0/C1 properties as Roblox internally optimizes Transform updates + you keep joint positions preserved which won’t break rigs that have different proportions.
Hopefully this provides you with enough information.