#How to change walking animation while walking?

11 messages · Page 1 of 1 (latest)

minor python
#

In my game i made a script that increases your walk speed as you keep walking, And i made 2 animations, One for running and one for walking, i made it so if the speed is less than 25 it goes to player's character and then animate script and then the walk string and then changes the animation id, and same for more than 25 for running, But when i test it it looks like my character is still doing the walk animation and when i stop and walk again (the speed is more than 25) he does the running animation.

If you didn't understand something tell me and i will give a better explanation.
So here is the part of the script to change animations:

if speed < 20 then
    character.Animate.walk.WalkAnim.AnimationId = "rbxassetid://123456789"
else
    character.Animate.walk.WalkAnim.AnimationId = "rbxassetid://123456789"
end

So how can i change my walk animation while walking and affects it?

Im not asking for any scripts, I just need the solution and i will script it myself.

Im really sorry, i wasn't able to put a video because my video size was over than 200mb (and it was just like 7 seconds)

next pagoda
#

I would advise you to instead switch between the animations when you actually increase or decrease the walkspeed.

minor python
minor python
minor python
next pagoda
#

You surely did something wrong then, mind sharing the full code to help?

foggy ore
#

connect to humanoid running and play the animation when speed is greater than like 0.1. or you can run the game, copy the animator script, paste it in starter character and change the animation ids

minor python
# foggy ore connect to humanoid running and play the animation when speed is greater than li...

I tried playing animation when the animation id is changed and now it looks weird:

if speed < 20 then
    character.Animate.walk.WalkAnim.AnimationId = "rbxassetid://17609055384"
    humanoid:LoadAnimation(animrun):Stop()
    humanoid:LoadAnimation(animwalk):Play()
else
    character.Animate.walk.WalkAnim.AnimationId = "rbxassetid://17609018123"
    humanoid:LoadAnimation(animwalk):Stop()
    humanoid:LoadAnimation(animrun):Play()
end
minor python