Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

[Solved]How can I fix my animation script?

Asked by 6 years ago
Edited 6 years ago

I used this script to play an animation:

01local 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)
15end
16end

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

0
Make sure 'holdAnim' is correct and is the Animation object with the id. Could also be because you don't own the animation. xPolarium 1388 — 6y
0
Oh thats probably why. :P CaptainD_veloper 290 — 6y

1 answer

Log in to vote
1
Answered by 6 years ago

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.

0
Yeah, thats why. CaptainD_veloper 290 — 6y
Ad

Answer this question