Animation problem

Hello. I’m trying to make smooth animation transition when player moving.

There’s the issue, when i’m walking right, and then pressing W to move forward, my animation still going right.
Gyazo with issue: https://gyazo.com/bf1e217af4f26274c1b27b4a65ce0bc0

That’s the code i’m using right now.

if Input.KeyCode == Enum.KeyCode.D then
	c1.Animate.run.RunAnim.AnimationId = "rbxassetid://4942312563"
elseif 	Input.KeyCode == Enum.KeyCode.W then
c1.Animate.run.RunAnim.AnimationId = "rbxassetid://4942126061"
elseif 	Input.KeyCode == Enum.KeyCode.A then
c1.Animate.run.RunAnim.AnimationId = "rbxassetid://04942487845"
elseif 	Input.KeyCode == Enum.KeyCode.S then
c1.Animate.run.RunAnim.AnimationId = "rbxassetid://04942488918"

I don’t know any other alternatives, so if you know, i would be grateful if you tell me about the others.
Also sorry for my bad English

Hello, I couldn’t fully understand the problem

Hello, i’m trying to make something like this
https://gyazo.com/81733acadbc13c40dded49f1c82c0803

The id written on the script is the same as in this video?

Did you load the animations into the Humanoid? I believe just changing the AnimationId will not run the animation, for what I have done in the past, is load the actual animation before playing it. Sort of like how sounds work in Roblox, you can :Play(), :Stop(), :Pause(). For animations, you can do the same, however you need to load the animations in first. A great example of loading the animations in would be found here:

https://developer.roblox.com/en-us/articles/using-animations-in-games

In the “Playing Animations Directly”, it shows an example in which you load the animation into the humanoid, before actually playing it.

2 Likes