Hello everyone! I’m experiencing an odd issue with an animation I am playing on the player’s character where it seems to pivot around a point that is far away. Jumping makes the issue worse and causes the player to fly around. I will attach a video below and the code snippet that is running the animation.
Video: https://gyazo.com/792a50bc1da3aef1a831eb517dde35e4
Code:
local animationClass = Instance.new("Animation", player)
animationClass.AnimationId = "rbxassetid://"..styleInfo.AnimationId
local throwingAnimation = Humanoid:WaitForChild("Animator"):LoadAnimation(animationClass)
throwingAnimation.Priority = Enum.AnimationPriority.Movement
throwingAnimation:Play()
task.spawn(function()
task.wait(1.5)
clonedBall:Destroy()
task.wait(2.5)
throwingAnimation:Stop()
throwingAnimation:Destroy()
player.Character:FindFirstChild("HumanoidRootPart").Anchored = false
end)
And yes, I am anchoring the root part before playing the animation