How do I animate the gun animations while crouching?

Hey all!

So I’ve been coding this gun system for a while now, but the thing that’s stumped me is the crouching animations. What I’m aiming for is something similar to Cishashto’s Entry Point. I’ve uploaded a Medal clip here to see what I mean:

External Media

(0:06 shows what I’m after the best)

The arms move dynamically straight ahead, even if the torso rotates towards the ground.

Now, what I’ve tried is constantly resetting the Motor6D.Transform, but that usually leads to wacky looking animations.

image

local renderSteppedEvent = rs.RenderStepped:Connect(function()
	offset = CFrame.fromEulerAnglesXYZ(angle, 0,0)
end)

-- this should update the Motor6D Transforms
local steppedEvent = rs.Stepped:Connect(function()
	motor.Transform *= offset
end)

What I’m mainly looking for is a better alternative to create smoother animations like Entry Point’s. Any help is appreciated, thanks for reading!

You can try using animations with Animation Priority which allows certain animations to override others. You can create an animation for crouching and put it as Action1 and then for the gun holding animation you can set it as Action2 but make sure not to animate any parts of the body that you don’t want the gun holding animation to override the crouching.
Hope this helps!

1 Like

Will this mean that I will have to create individual animations for when you hold the gun while crawling or crouching?

Because if so, I might scrap crouching all together…

Not necessarily, all you need are two animations: The crouch animation you already made and the gun holding animation. For the gun holding anim you just need to animate the arms and not touch anything else. You can just use one key frame (basically just position the arms) for the gun holding animation so the arms don’t move. Roblox should automatically blend them together when you’re crouching or not if you utilize animation priority properly. I can show you an example on how to achieve this if you would like.

1 Like

Hmmm, so I’d create a second animation that positions the arms upwards, and then let the regular idle animation do the rest?

I’ll code it and see how it looks and send an update.

My only problem is what should I do with animations that move the upper limbs?

1 Like

Probably something like this

Did you end up getting it to work?

As for the limbs, send a screenshot of what the animation looks like while crouching, if you didn’t get the animation to work correctly.