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

Keep in mind that the transform property is not replicated and therefore must be used on the client only.

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.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.