Help With Infinite Yield On Custom Walk For Custom Rig

For context, I’m making a custom rig with custom animations, the walk animation didn’t work so I checked the output, It said something about an infinite yield being possible on Player.Animation:WaitForChild(“walk”). Could anyone tell me what I’m doing wrong?

local Character = script.Parent
local Humanoid = Character:WaitForChild("Humanoid")

local WalkAnim = script:WaitForChild("walk")
local WalkAnimTrack = Humanoid.Animator:LoadAnimation(WalkAnim)

local IdleAnim = script:WaitForChild("idle")
local IdleAnimTrack = Humanoid.Animator:LoadAnimation(IdleAnim)

Humanoid.Running:Connect(function(speed)
	if speed > 0 then
		if not WalkAnimTrack.IsPlaying and IdleAnimTrack.IsPlaying then
			IdleAnimTrack:Stop()
			WalkAnimTrack:Play()
		end
	else
		if WalkAnimTrack.IsPlaying and not IdleAnimTrack.IsPlaying then
			IdleAnimTrack:Play()
			WalkAnimTrack:Stop()
		end
	end
end)

IdleAnimTrack:Play()

Here is a screenshot of the error message:


The message appears whenever you walk.

Oops, I just misspelled it my bad.

walk is not a child of a script.
Simple as that.
Script literally tells you that