I made a custom character, a mech, which should play the idle and walk animation but none of that is happening, any reason why?
scrpit:
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 then
walkAnimTrack:Play()
end
else
if walkAnimTrack.IsPlaying then
walkAnimTrack:Stop()
end
end
end)
humanoid.Running:Connect(function(speed)
if speed == 0 then
idleAnimTrack:Play()
end
end)
Is this a LocalScript or Script? Also have you tried playing animation simply without calculating speed and stuff to confirm if that rig is welded properly?