Animations for custom rig doesn't fully play

This is a support category for asking questions about how to get something done on the Roblox websites or how to do something on Roblox applications such as Roblox Studio.

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I am an intermediate programmer who wants to learn more.
    I am currently developing a horror game just for fun

  2. What is the issue? Include screenshots / videos if possible!
    Like stated in the title, I am having issues with animation for rigs

I made it like this in animation editor

But when I ran the game, the animation appeared like this:

Heres the script I used:

local character = script.Parent
local humanoid = character:WaitForChild("Humanoid")

local walkAnim = script:WaitForChild("Walk")
local walkAnimTrack = humanoid:LoadAnimation(walkAnim)

humanoid.Running:Connect(function(speed)
	if speed > 0 then
		if not walkAnimTrack.IsPlaying then
			walkAnimTrack:Play()
			character:WaitForChild("HumanoidRootPart").FootStep:Play()
		end
	else
		if walkAnimTrack.IsPlaying then
			walkAnimTrack:Stop()
			character:WaitForChild("HumanoidRootPart").FootStep:Stop()
		end
	end
end)
  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    There aren’t that many solutions, since most of the ones I found are about startercharacter animations.

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

Let me know if you have any solutions that may help.