So I made a crouch animation, and when I press “C” it changes my default idle and walk animations to Crouch animations. The only problem is that while I’m holding my gun, it executes this code:
RS.RenderStepped:Connect(function()
if not HoldingGun then return end
Char:SetPrimaryPartCFrame(CFrame.lookAt(
HRP.CFrame.Position,
Vector3.new(Mouse.Hit.Position.X, HRP.CFrame.Position.Y, Mouse.Hit.Position.Z)
))
end)
This essentially makes it so the character faces the mouse position, but the only problem is that when you crouch while this is active this happens:
The crouching works perfectly fine when I’m not bothering the Humanoid Root Part’s CFrame.
My initial thought is that the Torso position is being overwritten by whatever animation you are playing when holding the gun? That could possibly be why
You might need to adjust your holding animation so that the torso has no keyframes, or set animation priority of the crouching to a higher priority than the holding one