Animation leaving arms locked

My throw animation isn’t working as intended. This is what it is supposed to look like:

But when I try to play it the arms just get stuck in the air:

function onEquipped()

	holdAnimationTrack = animator:LoadAnimation(holdAnimation)
	holdAnimationTrack:Play(.0001, 1, 10000)

end

function onActivated()

	holdAnimationTrack:Stop()
	throwAnimationTrack = animator:LoadAnimation(holdAnimation)
	throwAnimationTrack:Play()

end

And if I never play the hold animation, I still get the problem:

However, if I never play the throw animation, the arms will return to normal. Both animations are not looped and are set to Action.

1 Like

Why are you playing the animation at 10,000x speed??

2 Likes

im just gonna assume your loading the animations on a server script since your loading the animations as they happen.
my best guess on fixing this is to load the animations on a LOCALSCRIPT and tie them to the tool’s events (equipped, unequipped, and activated)
on activated, stop your idle animation and play your throw animation
on equipped and unequiped play your idle animation.
but instead of loading them as the events fire, load them with LocalPlayer.Character.Humanoid.Animator (or any other path to the animator you have.)
heres a script that might fix your issue

local char = plr.Character
local hum:Humanoid = char:WaitForChild("Humanoid")
local anim:Animator = hum:WaitForChild("Animator")
local hold = PATH TO YOUR HOLD ANIMATION
local throw = PATH TO YOUR THROW ANIMATION
local holdTrack = anim:LoadAnimation(hold)
local throwTrack = anim:LoadAnimation(throw)

script.Parent.Equipped:Connect(function()
	holdTrack:Play()
end)
script.Parent.Unequipped:Connect(function()
	holdTrack:Stop()
end)
script.Parent.Activated:Connect(function()
	holdTrack:Stop()
	throwTrack:Play()
end)

You’re right it is a server script. I will try doing it on a local

Your code does work. Putting animation objects inside the tool and then referencing them seems to be key. I guess the animations needs to be parented?

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