Animation with m6d not working properly

  1. What do you want to achieve?
    I want to call a animation with parts when you activate a proximity promt.
    Basically you go activate the promt and then the animation plays.
  2. What is the issue?

The animation does play but the parts that are animated are not in the actually position they should be during the animation.
Animation edtior:

Ingame:

The code:

game.Players.PlayerAdded:Connect(function(plr)			
	plr.CharacterAdded:Connect(function(char)		
		local M6D = Instance.new("Motor6D", char.Torso)
		M6D.Name = "ToolGrip"
	end)
end)

script.Parent.Triggered:Connect(function(plr)

	local axe = script.Parent.Parent.Parent.axe:Clone()
	axe.bodyattach.Anchored = false
	axe.Parent = plr.Character
	local char = plr.Character
	
	char.Torso.ToolGrip.Part0 = axe.bodyattach
		char.Torso.ToolGrip.Part1 = char.Torso

	axe.bodyattach.Position = char["Left Arm"].Position 
print(axe.bodyattach.Position)
	local animator =  char.Humanoid:WaitForChild("Animator")
	local anim = animator:LoadAnimation(script.Parent.Parent.Parent.Animation)

	anim:Play()
	anim.DidLoop:Connect(function()
		wait(2)
		axe:Destroy()
	end)
	



end)


  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I tried changing animation priority, with no effect, I tried getting the axe to the hands position, no effect
    Redoing the animation didn’t work either. I searched on youtube and on here for posts or videos about it, but didn’t find any. Mabe it’s quite an obvious mistake, if that’s the case I am sorry.
1 Like