Animation not working

Okay this is getting out of hand.

I was just programming an NPC that simply plays an animation and walks forward. For some reason it doesn’t work.

I have tried everything I can think of. I double checked the animation ID. Triple checked for errors(well more than that really). I quadruple checked the devhub. I used Animator and Animation Controller; neither of them worked. I enabled studio access to API. I even directly loaded and player the animations through the command bar.

Nothing works. I even checked past topics.

Here is the code. I mean it has no errors whatsoever.

local Character = script.Parent
local Humanoid = script.Parent:WaitForChild("Humanoid")

local Animation = script:WaitForChild("WalkAnim")

local Animator = Instance.new("Animator",Humanoid)
local AnimationTrack = Animator:LoadAnimation(Animation)
AnimationTrack:Play()


Thank you for reading this.

Any suggestions are welcomed. Any.

2 Likes
local Character = script.Parent
local Humanoid = script.Parent:WaitForChild("Humanoid")

local Animation = script:WaitForChild("WalkAnim")

local AnimationTrack = Humanoid:LoadAnimation(Animation)
AnimationTrack:Play()

Who owns the game, is it a group game? If so try reuploading the animation to the group.

I don’t usually like using deprecated stuff. However, I will attempt it.

Ah, it’s just owned by me. It’s a testing game. There is only one other script. What is weird is that it works with the default Roblox animation but not this one for some reason

I never used your method and it’s not deprecated (may be wrong, not sure), but it always works for me.

and

are both deprecated.

What is your animation ID?

Also, where is this script stored?

Oh, but thet still work fine you can use them. But the question is…did mt method worked?

I am using this animation. I can’t animate so I am using this animation
Robot Walk - Roblox
The script is a server script located in the NPC
The code runs and debugging shows that the animation is playing. I still see no animation.

Well, make sure you have the correct animation ID. Here I found the animation ID.

http://www.roblox.com/asset/?id=616095330

or

rbxassetid://616095330

You can’t use the bundle ID directly, use their animation instead.

Unfortunately no, it didn’t. It must be a problem with the animation itself. I wonder what the problem is.

I didn’t use the bundle directly. I linked what I used. Robot Walk - Roblox

I’m not sure if I couldn’t explain it well, but you can try it with the animation I gave.

AHA, found it. Animation controller :Load Animation… For some reason deprecated stuff works.
The animation Load from humanoid does not work neither does animator but animation controller does!
Walk animations only work with animation controllers.


Lol. I made this post for no reason. Hopefully people who have same problem as me find this.
Works a charm :smiley:
https://gyazo.com/1727ec3c836fac496602b68fdcf9985a

2 Likes