Animation not playing

so, i was trying to make an idle animation when the player equip the tool, but for some reason when i equip the tool the animation dont play

here’s the script:

`
local tool = script.Parent

local animation = Instance.new(“Animation”)
animation.AnimationId = “rbxassetid://14639886152”

local function onEquipped()
local humanoid = tool.Parent:FindFirstChild(“Humanoid”)
if humanoid then
local animationTrack = humanoid:LoadAnimation(animation)
animationTrack.Priority = Enum.AnimationPriority.Action
animationTrack:Play()
end
end

tool.Equipped:Connect(onEquipped)
`

3 Likes

Any errors in the output?
Also right now there is some weird bug on roblox witch breaks animations
(Failed to load Animation - sanitized ID - #50 by itz_rennox)

2 Likes

well, apparently there is a bug in roblox studio, sometimes when you publish your animation roblox can take a while to actually post it to the library, I don’t know if it’s a bug or if just roblox is checking something in the animation, but it seems to be that

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.