Weapon Animation Resets Back From Where It Started

I am trying to make an animation for my weapon. This is a Hold position and as soon as the player equips the weapon, an animation should play.

Well, everything works fine but the problem is that the animation goes back the default animation as soon as I equip the weapon.
As you can see, as soon as I equip the weapon, the animation resets.
I want it so that the pistol stays in the same position (The Hold Position).

For your reference, I am following this tutorial from the DevForum:

This is my local script:

local Player = game.Players.LocalPlayer
local char = Player.Character or Player.CharacterAdded:Wait()
local WeaponTool = script.Parent

local Humanoid = char:WaitForChild("Humanoid")

local Animation = script.Parent.Hold
local AnimationTrack = Humanoid:LoadAnimation(Animation)

	char.UpperTorso.ToolGrip.Part0 = char.UpperTorso
	char.UpperTorso.ToolGrip.Part1 = WeaponTool.BodyAttach
	if AnimationTrack.IsPlaying then
		print("Playing animation track")


It does print “Playing Animation Track”.

Is there any way to stop the animation from going back to the original position?
And another problem is that as you can see that the weapon comes from the torso. That doesn’t look good. Is there any way we can fix this?

Thanks for any help

I think that when you exported the animation, you forgot to set it’s Animation Priority.

What causes the bug, is that the priority of the normal character animations is now higher than your animation priority. Go into the animation editor and go in the same menu where you export it (the little drop-down menu). Then you select “Animation Priority” and change it to “Action”. Export your animation again and it should work.

I set the Animation Priority to Action but still it shows the same thing…:frowning:

This image is to show that I did set the animation priority to Action.
And I did export it again but still doesn’t work… :frowning:

This is the animation in the animation editor:

Can i ask why you are welding the gun? It should be done automatically when you’re making a tool.

Oh and, is looping enabled? It might just play the animation once and then stop.

I don’t have animation set to loop. Because if I will, the player will equip it again and again.
Like below:
As you can see, if I set it to loop, then the player equips the weapon again and again.
Please let me know if you have any fix for this as I really need to fix this issue.

1 Like

Then you should script it so you play the equip animation first, and then use the looped “holding” animation.