Animation bugging out

Animation bugs out when the bot walks or is about to become idle, not sure why. Any ideas?

Video: Editor.mp4 on Vimeo (The first 3 seconds in particular)

script:

local Animations = script:GetChildren()
local Walk = Huma:LoadAnimation(Animations[2])
local WArms = Huma:LoadAnimation(Animations[1])

local function CheckSpeed(speed)
	if math.ceil(speed) > 5 then
		Walk:Play()
		WArms:Play()				
	else
		Walk:Stop()
		WArms:Stop()
	end
end
			
Huma.Running:Connect(function(speed)
	CheckSpeed(speed)
end)

Animations can work a bit wonky when attempting to rapidly check so often oof

Try changing the conditional check to 0 instead of 5?

Same thing happens no matter the number