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()
local Character = script.Parent
local Humanoid = script.Parent:WaitForChild("Humanoid")
local Animation = script:WaitForChild("WalkAnim")
local AnimationTrack = Humanoid:LoadAnimation(Animation)
AnimationTrack:Play()
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 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.
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.