Why is my animation not playing?

its just better ngl i know it wont change anything but its worth a try right

1 Like

It’s hard to determine on what line the error occours.
Do this:

  • Don’t load the animation every time you want to play it; load it only once!
  • Check if the Animator actually exists when the tool is activated (you may actually want to declare a variable containing it beforehand)
    ^ It should probably be there though. Are you using a custom character without it?
  • check if the animation was uploaded correctly (e.g. if it’s a group game, it should be uploaded to the group)

By the way, you misspelled the variable “animation” as “animtaion”.

3 Likes

This is somewhat common, here are some potential fixes according to sources on the DevForum:

  • Upload the animation as a group animation
  • clear your temp files by
  1. press windows button + r
  2. type “temp” without the quotation marks and hit enter
  3. delete all the files by pressing ctrl+a and hitting delete
  • clear your internet cache by
  1. press windows button + r
  2. type “cmd” without the quotation marks and hit enter
  3. type “ipconfig /flushdns” without the quotation marks and hit enter
  • Enable “Reload Assets” in the Debug Panel of Studio Settings
1 Like

you should actually check if the animation is actually made under your name and not under your group
check if the animation is actually inside the tool
check if the tool is actually being activated
if you dont have a handle make sure require handle is off

So the animation is made by the creator of the game but even in a public server i get that error. I changed up the script to look like this

local tool = script.Parent

local Animation = Instance.new("Animation")
Animation.AnimationId = "rbxassetid://13983969765"
Animation.Parent = tool
tool.Activated:Connect(function()
    local animationTrack = tool.Parent.Humanoid.Animator:LoadAnimation(Animation)
	Animation:Play()
end)

And also i still get the animationTrack inside the activation because easier to find character. Anything wrong here or is this a roblox error.

This is what I’m getting in output now from this script

do animationTrack:Play()
see if that fixes anything

dang i was so tired last night i didn’t even realise, appreicate it ill give you solution if this solved it

I’m getting same error


is this a roblox glitch because nothing is wrong with script?

local tool = script.Parent

local Animation = Instance.new("Animation")
Animation.AnimationId = "rbxassetid://13983969765"
Animation.Parent = tool
tool.Activated:Connect(function()
    local animationTrack = tool.Parent.Humanoid.Animator:LoadAnimation(Animation)
	animationTrack:Play()
end)

Also my friend owns animation and he owns the game but that shouldnt change anything? Maybe he needs to make animation public?

Is the game made under a group? If yes make sure the animation is actually published under the group

I was thinking it was under my mates name but no it’s actually in a group thanks alot appreciate this!

it is still giving same error even under the group. Anyone have a clue why?

You can try doing this, according to another DevForum topic that has a similar problem.

1 Like

Sorry i didn’t quite understand solution but this is even happening in roblox not just studio

Are these animations uploaded under your account?

so it is a group game and uploaded under the group

Are you the Owner of the group, and published it under the group?

Change the animation id to the new one, that’s the same as the old one.

its a group game but are you sure the animation was uploaded from the group or from the owner of the group?

I think this should work in a local script :

local tool = script.Parent
local player = game:GetService(“Players”).LocalPlayer
local humanoid = player.Character:WaitForChild(“Humanoid”)
local animtaion = script.Parent:WaitForChild(“Swipe”)
local animationTrack = humanoid:LoadAnimation(animtaion)
local debounce = false

tool.Activated:Connect(function()
if not debounce then

          debounce = true
          animationTrack:Play()
          task.wait(--duration of your animation--)
          debounce = false
   end

end)

I hope this helps.