Humanoid animation with tool playing incorrectly when playtesting but works in studio

Hi, so I have this issue with my animation created in Moon Animator 2.

Edit: The external media links are to Medal.com clips of my video explanations. Does anyone know of a better way to embed videos here long-term (discord attachment links expire after years I believe)

Edit 2: My fault. I completely missed the upload button here. I was not at all expecting that ability haha. But I’ll keep the medal links in case the uploads expire and someone wants to see them 5 years down the line. I hate seeing old threads with an issue I’m experiencing but broken attachments, but I digress…

Final edit: Maximum upload size of 10 mb. whoops…

The animation is supposed to look like below. On equipping a knife, an equip animation is played, pulling the knife from somewhere in front of the character (shown) and then spinning it a full circle around their hand. Below is what this looks like in studio:

External Media

If it helps, note that the knife’s “original” position in front of the character is a keyframe in the animation itself and not a script or anything like that.

However, upon playtesting this in studio, I’ve come across an issue where the knife is not rotating around the hand as it did in the editor. Upon slowing it down frame by frame and looking at it at different angles, I can make out that it seems to “skip” a whole set of keyframes in the rotation, taking a the shorter route to a keyframe that appears later (blending?). Also, I set the transparency of the Baseplate to one to see that the knife is appearing from a different location as well and coming through the ground. Video below.

External Media

Below is an image of what I mentioned earlier; the knife travels from this position to the following position, cutting through the torso (and you can see the glowing tip of the knife sticking through my back and shoulder in the video, at 0:12 seconds).

image

Below is the descendant tree of the knife tool.
image

And below is the code in the LocalScript knifeLocal (apologies if it’s hard to read. The commented-out lines are from previous fix attempts:

local knife = script.Parent.Parent

local m6d

knife.Equipped:Connect(function()

	print("knife equipped")

	local char = script.Parent.Parent.Parent

	local hum = char:WaitForChild("Humanoid")

	local animator = hum:WaitForChild("Animator")
	
	local weld = char:FindFirstChild("RightHand"):WaitForChild("RightGrip")
	
	print (weld.ClassName.. " is weld class")
	
	m6d = Instance.new("Motor6D")
	
	m6d.Name = "RightGrip"
	m6d.Part0 = weld.Part0
	m6d.Part1 = weld.Part1
	
	print("weld C0 is ", weld.C0.Position, "then")
	
	
	m6d.C0 = weld.C0
	--m6d.C0 = CFrame.new(weld.C0.Position)
	--m6d.C0 = CFrame.Angles(math.rad(-90), 0, 0)
	m6d.C1 = weld.C1
	
	weld:Destroy()
	
	m6d.Parent = char:FindFirstChild("RightHand")

	local animEq = Instance.new("Animation")
	animEq.AnimationId = "rbxassetid://18345359837"

	local equipAnim = animator:LoadAnimation(animEq)
	
	--equipAnim.Priority = Enum.AnimationPriority.Action4
	--print(equipAnim.WeightTarget)
	
	--equipAnim:AdjustWeight(1, 0.1)
	
	equipAnim:Play()

	print (m6d.Parent)
	--print(equipAnim.WeightCurrent)
	--print(equipAnim.WeightTarget)
end)

I’ve seen several similar issues posted in my mind-numbing search for a clue but many of them were either explaining a different solution for a different issue (which didn’t work for me) or a simple accident that was made which I hadn’t made. I’m really at a loss for things to do, everything I’ve tried has had zero effect :pensive:

I’ve done a lot to try to fix this to no avail:

  • Made sure no components of knife were collidable nor anchored

  • Turned knife components including handle Massless

  • Set animation Priority to Action4 by script

  • Set animation Priority to Action4 in editor of original file, then re-imported it to default Roblox Animation Editor and tried the same thing again

  • Tried playing around with the Weight property using AdjustWeight()

  • In the animator, created some more, new keyframes in between the aforementioned parts to see if that would force the animation to follow that path instead (It did not. Also, there were already keyframes in between the first and second image, and they were being skipped anyways. This really looks like blending, I think, but I’m very new to animating so I can’t be certain)

  • Changed the tool grip orientation of the Tool object. This actually made it look slightly closer to the studio image, but afterwards I changed it back to how it was before since I had a hunch it was only looking more accurate by accident.

  • Manually set the CFrames of the Motor6D by manually inputting a new CFrame (for some reason). Went back to m6d.C0 = Weld.C0 afterwards.

I really don’t know how to make the animation play the way it should. My gut is telling me it has to do with the weights and blending and priority and whatnot but I’ve already tried all kinds of ways of making the priority Action4, including like 7 new assets so far for the same exact animation. Any help would be greatly appreciated!

1 Like

Replaced medal links with streamable links

and it still doesnt embed. :cry: can someone pls

What is the priority of your animation? I dont know if you mentioned what it was theres to much text for my small brain

Action4 is the priority

Also my bad haha I didn’t know how detailed I should be :sweat:

1 Like