I am trying to play an animation with a tool whenever that tool has been activated. When I try, my animation never plays.
local plr = game:GetService("Players").LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local h = char:WaitForChild("Humanoid")
local anim = h:LoadAnimation(script.Parent:WaitForChild("Animation"))
script.Parent.Activated:connect(function()
anim:Play()
end)
This code is Local Script in a tool in the starter pack The animation is a child of the tool and has an ID The animation is 1 second long The animations priority is set to [Action]

3 comments
Try printing something inside of the Activated function and comment out anim:Play() and see if it prints it out.
Tested the code in studio it worked for me so the script is fine it might be the set up
It was because I was using an R16 animation with an R6 only game. I didnt even notice, and I feel really dumb. UGH!