My animation refuses to play and I HAVE NO IDEA WHY

im just trying to get a STUPID animation to play and i cant get it to play, i tried to change animation priority to action or movement, asked AI, BUT IT REFUSES TO PLAY, I HATE THIS GAME I HATE MY LIFE, WHAT AM I DOING WRONG, WHY CANT I ACHIEVE SUCH SIMPLE THING, THIS SCRIPT IS LITERALLY IN STARTERCHARACTERSCRIPTS, THERE ARE NO ERRORS IN OUTPUT, W H Y Y O U D O N T P L A Y

local char = script.Parent
local humanoid = char:WaitForChild("Humanoid")
local animator = humanoid:FindFirstChild("Animator") or Instance.new("Animator", humanoid)

local anim = script:WaitForChild("Animation")

local track = animator:LoadAnimation(anim)

task.wait(3)
track:Play()
7 Likes

I think it might be this line of code possibly. Try this:

local animator = humanoid:WaitForChild("Animator") 
3 Likes

Or it could just be that the animation itself has been uploaded incorrectly or something because to me all the code should work, is the game on a group or account?

3 Likes

ok so when i try my old animations they play fine but when i try to upload new ones and copy their id, they dont play, problem is just in me after all

2 Likes

Where are you uploading the new ones too? Is it anywhere different than where the old animations were uploaded to? And are the animations meant to work for R15 or R6 because your game might be a differenT R version from the animation.

3 Likes
local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local humanoid = char.Humanoid

local animator = humanoid:FindFirstChild("Animator")

local anim = script:WaitForChild("Animation")

local track = animator:LoadAnimation(anim)

track.Priority = Enum.AnimationPriority.Movement

task.wait(3)
track:Play()

ugh this is my new script in starterplayerscripts and i still cant get it to play, i dont understand whats the problem, i upload new animations to the same place as my old ones, i dont really get

And are the animations meant to work for R15 or R6 because your game might be a differenT R version from the animation.

2 Likes

I meant is your game R15 or R6 because some animations only work for those versions.

2 Likes

which place is it? Your account or group? Is your game made on the group or made on your account?

1 Like

its on my account, im a failure i give up

1 Like

alright new stuff found: the animation id of my old animations is for some reason valid but my newer ones arent accepted and played, how does this happen?

3 Likes
  1. what’s the animation priority
  2. is the animation r6 or r15, and is your character r6 or 15
  3. where is this script loca te d
2 Likes

movement, my sciript isi n startercharactersceripts

2 Likes

what if you set the priority to Action4?

2 Likes

yeah i did but it did nothing…

What kind of animation is it you are trying to play? Make sure it has proper animation priority and that there are NO other default animations playing, for example if its a walking animation make sure to edit the default animate script so it doesnt play the default walking anim as it will override the one you want to play.

On a side note: Dont self deprecate as it leads you nowhere only postpones any meaningful progress, its self-sabotage, just take your time and enjoy the process of problem solving.
im here to help.

Is this a local script? StarterPlayerScripts only runs LocalScripts, it will ignore any ServerScripts. Also why are you putting in PlayerScripts? Its best to put in in CharacterScripts as it will ensure the players character loading properly

Had anxiety to respond but

Can you use humanoid:LoadAnimation() without using the Animator? It works also.

Note : char.Humanoid? You need to detect whether it exists or not so it’s probably char:FindFirstChild("Humanoid"). Another one, pls state again with if humanoid then so the script can fully check if it exists or it’s just a myth.

This is my possible respond and not anything is guaranteed.