How to Fix Broken Animations that wont play on your humanoid

So a while ago I made a post about my Model not working correctly and I didn’t get a lot of feedback so i had to take the problem to hand I found the problem with it and will explain to you if you have the same problem what to do.

There are Two parts, the first is for if you want an animation for the player/model
the second is for an AI/Model

Here are reasons why your Animation might not be playing

  • Make sure everything is anchored you will know if it isn’t anchored if your Model appears to be floating in the air.
    Screenshot 2021-04-20 083243
    An example is shown above

So make sure you go through all your parts take your time to unanchor all of the parts.

  • Your Script to play the animation isn’t working
    If your Local Script isn’t working I wrote one just for you to make sure these things are inside the model
  1. Local Script
  2. Animation inside the Local Script
  3. Make sure it is called Walk

And Paste this into the Local Script

Here is a script I made for you just put it inside the Local Script

local character = script.Parent
local humanoid = character:WaitForChild(“Humanoid”)

local walkAnim = script:WaitForChild(“Walk”)
local walkAnimTrack = humanoid.Animator:LoadAnimation(walkAnim)

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)

  • Your not placing things where they need to go
    Here is another list of where you need to put your Scripts/Models
  1. Make sure your Local Script is under StarterCharacterScripts
  2. Your Model if you have one put it in StarterPlayer
  3. Your Animation must be uploaded and put under the Local Script
  4. If you have a Model it MUST be called StarterCharacter

Now for is your making and AI animation here is a list of things you should try

Everything the same is applied except where you place it so if you skipped to this and after placing everything below it doesn’t work go back up because all of the same things for the character animation apply to the AI except the placement of it.

  • Make sure of one thing though when making an AI you need a normal script not a Local Script
  1. Make sure the model is placed under the workspace or you won’t see anything
  2. The code must go under a Script and placed into the Model
  3. The Animation must be named Walk and placed under the Script

That is really all I’m somewhat new to Roblox Studios and coding but I hope this helps I also became a DevForum Member a little while ago so I might not be the best at making helpful posts if you still have problems leave them in the comments I reply to all of them some I might not be able too because I’m new as I said but I will try to answer most hopefully other members will do the same in answering questions.

Thank you

2 Likes