New property: Motor6D.Transform

This property exposes the internal CFrame that is manipulated by Animations when a Motor6D is being animated.

Using this property it is possible to blend Roblox Animations with custom animations in Lua. This property should be read from and updated when the Stepped signal fires as this signal is fired immediately following animations being updated.

Here is some example code of how this property can be used:

local PlayersService = game:GetService("Players")
local RunService = game:GetService("RunService")
local LocalPlayer = PlayersService.LocalPlayer

-- Rotate left shoulder joint by 90 degrees 
-- in addition to the current animation being applied
RunService.Stepped:connect(function()
    local character = LocalPlayer.Character
    if character then
        character.LeftUpperArm.LeftShoulder.Transform = character.LeftUpperArm.LeftShoulder.Transform * CFrame.Angles(math.rad(90), 0, 0)
    end
end)

-- Overwrite current animation for the right arm
RunService.Stepped:connect(function()
    local character = LocalPlayer.Character
    if character then
        character.RightUpperArm.RightShoulder.Transform = CFrame.Angles(math.rad(90), 0, 0)
        character.RightLowerArm.RightElbow.Transform = CFrame.new()
        character.RightHand.RightWrist.Transform = CFrame.new()
    end
end)

This property is scriptable only, it can’t be set in the studio properties widget and it doesn’t serialize. For performance reasons this property won’t fire the Changed signal and it doesn’t replicate.

122 Likes

:pray:

bless up

8 Likes

woot

:fire:

4 Likes

Before the animation editor I remember doing a lot with welds in order to make movement happen.

4 Likes

Now I dont need to overwrite using an animation with a higher priority for each arm just so I can do IK.
yesssssssssssssssssssss

1 Like

Yes?

(Also nice job @op)

6 Likes

I see what you did there, and +1 to you

4 Likes

This is amazing! I’ll definitely be playing around with this today. :ok_hand::ok_hand:

tysm

Oh my god… literally an hour before you posted this I discovered this hidden property after spending 3 hours trying to figure out how to animate a character without removing its motor6Ds or attachments. I’m glad to see this being announced but I’m so irritated that I wasted 3 hours :confused:

4 Likes

oh yes

Except I can’t recall the last time I used Motor6D.

I can finally ditch my dumb constraint workaround

2 Likes

Doesn’t play nicely with platform stand :frowning:
(intended?)

1 Like

Thank you so much! This is such a helpful feature.

In what way?

the character’s joint transforms arent updated, so things like

character.RightUpperArm.RightShoulder.Transform = CFrame.Angles(math.rad(90), 0, 0)

will make the arm spin

I think you mean

character.RightUpperArm.RightShoulder.Transform = character.RightUpperArm.RightShoulder.Transform * CFrame.Angles(math.rad(90), 0, 0)

And yeah this makes things a little difficult.
I recommend using C0/C1 for “additive” effects like that. That way it doesn’t matter what Transform is currently set to.

5 Likes

Awesome. Thank you!
[imgur.com/a/L0wmM]

As bison would say, “Yes! Yes!”

Very much appreciated. I needed this for my custom animation system.

1 Like

Sweet! :o