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

I have this script with an idleanim and walkanim i add a jumpanim but it didnt work how do i fix it?

Asked by 3 years ago

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)

local jumpAnim = script:WaitForChild("Jump") local jumpAnimTrack = 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 if idleAnimTrack.IsPlaying then idleAnimTrack:Stop() end else if not idleAnimTrack.IsPlaying then idleAnimTrack:Play() end end end)

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

1 answer

Log in to vote
0
Answered by 3 years ago

When answering, if your answer does not fully solve the question, it should be written as a comment to the question instead of as an answer.

I Think, "Animator" its from the animator that you are using

Ad

Answer this question