I used this script to play an animation:
01 | local function equip() |
02 | equipped = true |
03 |
04 | --//Get humanoid |
05 | local character = player.Character or player.CharacterAdded:Wait() |
06 | local humanoid = character:WaitForChild( "Humanoid" ) |
07 |
08 | if humanoid then |
09 | --//Load animations |
10 | pcall ( function () |
11 | --//Hold animation |
12 | holdTrack = humanoid:LoadAnimation(holdAnim) |
13 | holdTrack:Play() |
14 | end ) |
15 | end |
16 | end |
But I get this error: 10:12:27.271 - Animation failed to load in "Workspace.CaptainD_veloper.Assualt Rifle.Animations.Hold.AnimationId": Animation failed to load
My educated guess is that you do not own the animation. Make sure you own it or if it is a group game your group owns it. Don't use animations that are not yours.