How to use Motor6D.Transform

I have been getting warning messages tell me to stop changing c0/c1 on motor6ds frequently and to use the transform property instead.

When I set Motor6D.Transform to a CFrame value it seems like nothing happened, can someone give me an example on how to use the property.

5 Likes

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.

If the Motor6D is part of an animated model with an Animator, then Motor6D.Transform will usually be overwritten every frame by the Animator after RunService.PreAnimation and before RunService.Stepped.

Properties inherited from Motor

Properties inherited from JointInstance

Properties inherited from Instance

2 Likes

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.

1 Like

If you want to combine it with animations it would be something like this:

motor6d.Transform = addedAnimationCFrame*motor6d.Transform

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

Link to bug report