local n=script:WaitForChild("\087\097\108\107")local t=humanoid.Animator:LoadAnimation(n)local H=script:WaitForChild("\073\100\108\101")local B=humanoid.Animator:LoadAnimation(H)humanoid.Running:Connect(function(n)if n>0 then if not t.IsPlaying and B.IsPlaying then B:Stop()t:Play()end else if t.IsPlaying and not B.IsPlaying then B:Play()t:Stop()end end end)B:Play()

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()
