Disable legs in animation track during runtime

I want to achieve animation blending, i want to add option to lunge attack with a sword, the thing is that the attack animation moves the legs (intentionally) so i want to disable the attack animations legs and play a different running animation only on the legs

Not sure if this is possible, i havent seen it yet

mixing the animation by weight, not so good results

any help is appreciated

The way I did this exact thing was by taking another rig and running the exact same animations on it as the player had (except all tool animations) and then I would take the Transform property of the second rigs Motor6Ds and apply it to the characters Motor6Ds. So something like:

RunService.PreSimulation:Connect(function() -- Ensure it's "PreSimulation" not anything else.
	if Walking then
		Character.Torso["Right Hip"].Transform = Rig.Torso["Right Hip"].Transform
	end
end)
for i,v in next, game:GetService("LegService"):GetLegs() do
   v.TrackEnabled = false
end

This will get all active animation tracks of r6 and r15 humanoid rig characters and remove the legs

very smart, thank you alot this could have been it, so i if i understand correctly, i run everything normally on the player, and run the running animation on different rig, when doing the lunge i use the RunService.PreSimulation and assign some of the players Motor6D’s transform to the other rigs transforms?

Very helpful too, thank you, i didnt know about this

1 Like

You can run the “RunAnimation” on both rigs, but while the lunge is being played, you can set some of the Motor6Ds of the character rig to the secondary rig.

In simple terms, exactly what you said, but with the addition of running the run animation on the character.

There is no such thing as a “LegService”. The user is probably joking.

1 Like

thanks for the explanation, i actually believed the LegService :sob:

One more thing you can do is to create an animation with the motion of the legs isolated and then play that animation with the run animation.

This is a much more easier approach which I didn’t think of while writing my original reply.

i would have to make all the attack animations have second version without legs no? or i could make the running animation weight so big it would overshadow it

No, I’m saying to just make a run animation with only the legs moving, no other body part. Then have it’s priority set to something like Action4 and play it with the run animation. (You shouldn’t play it only when the lunge is played, just play it by default while the player is running.)

1 Like

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