Animation Rotates Strangely After Being Fired A Second Time

  1. What do you want to achieve?
    Currently trying to make it so that one idle animation plays when the NPC is not being interacted with, and the other plays when the NPC is.
  2. What is the issue?
    The script runs fine. When I run the non-interacted idle for a second time, the NPC rotates strangely. Its orientation in properties does not change.
  3. What solutions have you tried so far?
    Removed all possible collidable objects, changed the rig, re-imported the animation, rewrote the script.

Here’s the script I’m using:

Summary
local idleTrackInteract = animator:LoadAnimation(interactIdleAnim)

local openStore = game:GetService("ReplicatedStorage"):FindFirstChild("makariOpenStore")
local makariSpokenTo = game:GetService("ReplicatedStorage"):FindFirstChild("makariSpokenTo")
local storeClosed = game:GetService("ReplicatedStorage"):FindFirstChild("makariStoreClosed")

local makari = script.Parent

idleTrackNoInteract.Looped = true
idleTrackNoInteract.Priority = Enum.AnimationPriority.Idle

idleTrackInteract.Looped = true
idleTrackInteract.Priority = Enum.AnimationPriority.Idle

interactWithTrack.Looped = false
interactWithTrack.Priority = Enum.AnimationPriority.Action

--while task.wait(1.5) do
idleTrackNoInteract:Play()
--task.wait(1.5)
--end

makariSpokenTo.OnServerEvent:Connect(function()
	idleTrackNoInteract.Looped = false
	interactWithTrack:Play()
	task.wait(4)
	idleTrackInteract:Play()
end)

storeClosed.OnServerEvent:Connect(function()
	idleTrackNoInteract.Looped = true
	idleTrackNoInteract.Priority = Enum.AnimationPriority.Idle
	idleTrackNoInteract:Play()
end)

Here’s what I mean by “rotating strangely”:

Summary


^ position on first play of the animation


^ position on second play of the animation

Here’s a video where you can see the animation in more detail:

Summary