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.
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)