Animation wont stop after using Stop()

So im trying to make an animation (which is playing on an NPC) to stop playing by using Stop()
currently they just override eachother and makes a huge mess

the following code is in a module script

local Anim = NPC.Humanoid.Animator:LoadAnimation(NPC.Down)
Anim:Play()

later in the code i want the animation to stop looping

DownAnim:Stop()

if you need any more context im willing to share

Full script? Give us some more context.

		local DownAnim = NPC.Humanoid.Animator:LoadAnimation(NPC.Down)
		DownAnim:Play()

		local Damaged = false
		NPC.Humanoid.Touched:Connect(function(Hit)
			if Hit.Parent:FindFirstChild("Humanoid") then
				if Damaged ~= true then
					local Player = game.Players:GetPlayerFromCharacter(Hit.Parent)

					if Player then
						Damaged = true

						local Highlight = NPC.Highlight
						Highlight.OutlineColor = Color3.fromRGB(255, 0, 0)
						Highlight.FillColor = Color3.fromRGB(255, 0, 0)
						Highlight.FillTransparency = 0
						Highlight.OutlineTransparency = 0

						task.delay(0.1, function()
							Highlight.OutlineColor = Color3.fromRGB(255, 255, 255)
							Highlight.FillColor = Color3.fromRGB(255, 255, 255)
							Highlight.FillTransparency = 1
							Highlight.OutlineTransparency = 0
						end)
						
						DownAnim:Stop()
						Down = false
						CanTP = true
						CanAttack = true
					end
				end
			end
		end)

Could you record what it looks like ingame? What’s the animations priority?

sadly i dont have any programms (or capabilities) to record

but i can describe it:

all the animations play all together making the npc just end up in the average position of every frame

i hope this helps

whats DownAnim’s priority? if its below or the same as the other animations priority it will overlap.

i honestly forgot to set the animation priority to 4 thanks for the help

you’re welcome. welcome to the dev forums.