Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do i play Idle animation on custom rig?

Asked by 2 years ago

I already have my moving animation for custom rig and it works by checking if npc is moving

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

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

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)

But for some reason when i do the same for Idle it doesnt work

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

local idleAnim = script:WaitForChild("Idle")
local idleAnimTrack = humanoid.Animator:LoadAnimation(idleAnim)

humanoid.Running:Connect(function(speed)
    if speed > 0 then
        if idleAnimTrack.IsPlaying then
            idleAnimTrack:Stop()
        end
    else
        if not idleAnimTrack.IsPlaying then
            idleAnimTrack:Play()
        end
    end
end)

(Btw using roblox's animate script doesnt work) Can anyone help me?

2 answers

Log in to vote
0
Answered by
Puppynniko 1059 Moderation Voter
2 years ago

you need to make the animations your self using the custom rig

0
I know but the animation is not playing i have it already animated kubapro213748 -13 — 2y
0
is it correctly rigged? Puppynniko 1059 — 2y
Ad
Log in to vote
0
Answered by 2 years ago

test the animatesauce from baconchiips and with it you can also put a walk,run,jump,climb,others animations

Answer this question