Is there something wrong with this crouching script breaking animations

This script plays a crouching animation and idle while holding C, though only half the crouching movement animation is played

is there something wrong with the script? i tried multiple animations and they all do it

local Player = game.Players.LocalPlayer
local Humanoid = Player.Character:WaitForChild('Humanoid')

local RunAnimation = Instance.new('Animation')
local humanim = Player.Character.Humanoid:LoadAnimation(script.CrouchAnimation)
local humanimid = Player.Character.Humanoid:LoadAnimation(script.CrIdleAnimation)
Running = false

local WalkingSpeed = 10
local CrouchSpeed = 7

function Handler(BindName, InputState)
	if InputState == Enum.UserInputState.Begin and BindName == 'RunBind' then
		Running = true
		Humanoid.WalkSpeed = CrouchSpeed
		humanimid:Play()
	elseif InputState == Enum.UserInputState.End and BindName == 'RunBind' then		
		humanim:Stop()
		humanimid:Stop()
		Running = false
		Humanoid.WalkSpeed = WalkingSpeed
	end
end

Humanoid.Running:Connect(function(Speed)	
	if Running and not humanim.IsPlaying then
		if Speed >= CrouchSpeed - 1 then
			humanim:Play()
			Humanoid.WalkSpeed = CrouchSpeed
		end
	elseif not Running and humanim.IsPlaying then
		if Speed < CrouchSpeed - 1 then
			humanim:Stop()
			humanimid:Stop()
			Humanoid.WalkSpeed = WalkingSpeed
		end
	end
end)

Humanoid.Changed:Connect(function(property)
	if property == "Jump" and humanim.IsPlaying then
		humanim:Stop()
		humanimid:Stop()
	end
end)

game:GetService('ContextActionService'):BindAction('RunBind', Handler, true, Enum.KeyCode.C)

Hello! I have not tested this script, but a possibility that could have happened is either the animation blending is disabled or that the set time of the animation being played is too short compared to the length of the animation. Since changing the weight for animations in properties has been deprecated, I would try creating a boolean attribute in the workspace and name it RbxLegacyAnimationBlending, credit to GoldSebi for this.