Animation issue - Part not animating

I used this tutorial to animate the extra part: How to animate a tool/object with a Dummy in the Animation Editor

When I play the animation in the editor, the extra part animates completely fine. When I try playing it ingame on an NPC, the limbs animate however the extra part does not, it does play correctly every 1 out of 5 or so times. I’m pretty sure I’ve setup the part right. Below is my script.

local anim = char.Humanoid:LoadAnimation(script.tossAnim)
local boulder = script.Boulder:Clone()
boulder.Parent = char
local M6D = Instance.new("Motor6D",char.RightHand)
M6D.Part0 = char.RightHand
M6D.Part1 = boulder
anim:Play()

Things I’ve tried:
Adding a wait between the boulder being created and the animation playing.
Loading the animation after creating the Boulder
Made sure it was setup right by running the script in studio and opening up the animation editor, it played normally in the editor.

Not too sure how to troubleshoot this, help would be appreciated. Thanks!

Should’ve fixed it, is there anything you can provide that’s consistent for when it does work or what you have to do…?

I think I’ve pinpointed the issue. It seems to break with attacks that I have a knockback animation on (about .5 seconds long, but I do animation=nil at the end of all attacks)

But when I play a “test” attack that has no knockback animation, it always works. Is there any reason for this, or a way I can unload the animation? It’s only about half a second long + I be sure to make everything nil/destroyed at the end of the attack. However, I don’t destroy the animation object, it’s stored inside of the script of the attack so would that mess something up?

Also, here’s a picture of it not working so you can see what I mean (Boulder doesn’t animate): https://gyazo.com/f983b4f9e0b0cc6751e93b70ac036569