my code:
local Tool = script.Parent local Player = game:GetService('Players').LocalPlayer local Character = Player.Character if not Character or not Character.Parent then Character = Player.CharacterAdded:Wait() end local Humanoid = Character:WaitForChild('Humanoid') local Animator = Humanoid:WaitForChild('Animator') local EquipAnimation = Tool.Animations.Equip local EquipAnimationTrack = Humanoid:LoadAnimation(EquipAnimation) EquipAnimationTrack.Priority = Enum.AnimationPriority.Action EquipAnimationTrack.Looped = false Tool.Equipped:Connect(function() EquipAnimationTrack:Play() end) Tool.Unequipped:Connect(function() EquipAnimationTrack:Stop() end)
it works in the animation editor but not when i test it. Can anybody help?
I have two keyframes if that helps. I also have a Motor6D attached to the hand.
Here are a few troubleshooting tips.
. Did you put a valid AnimationID (that you uploaded, or group uploaded) in the Animations.Equip?
. Is this script a Script? If not. Put it as a Localscript as you are trying to get localplayer.
. Check in output in View > Output.
Why I am putting this? It worked perfectly in game and it should with you as well. Have fun!
I found out it was because I used motor6ds! Thank you for your help!