Animation playing COMPLETELY wrong

My friend made an animation for the earthworm in my game, but whenever I play the animation, it plays incorrectly.
Here’s a video to demonstrate what happened:


The code I used to play the animation:

local AnimationInstance = Instance.new("Animation")
AnimationInstance.AnimationId = "rbxassetid://" -- I'm hiding the ID just incase
AnimationInstance.Parent = script

local Earthworm = script.Parent
local HumanoidRootPart = Earthworm:WaitForChild("HumanoidRootPart")
local Humanoid = Earthworm:FindFirstChildOfClass("Humanoid")
local Animator = Humanoid:FindFirstChildOfClass("Animator")

local Animation = Animator:LoadAnimation(AnimationInstance)
Animation.Priority = Enum.AnimationPriority.Action
Animation.Looped = true
Animation:Play()

Any help would be much appreciated!

1 Like

Are you sure you have the proper parts anchored? I would recommend just doing the actual movement through code or physics instances rather than moon animator.

I’ve tried anchoring the humanoid root part but that didn’t seem to fix the issue

im having a problem related to that, where the player animation is fine, but the parts that i addeded to be able to animate as well is not moving, they are just rotating.

1 Like