Issue with custom crawl Animations

I am trying to make a crawl animation

The issue is that when I test it in game, the animation doesn’t FULLY play
In studio:
Studio Animation
In game:
in game
I have looked al over the forums but to no luck.

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
My code:

local player = script.Parent.Parent
local char = player.Character or player.CharacterAdded:Wait()
local UIS = game:GetService("UserInputService")
local human = char:WaitForChild("Humanoid")

local hrp = char:WaitForChild("HumanoidRootPart")
local Animator = human:WaitForChild("Animator")

local isPlaying = false
function createAnims ()
	local diveR6 = Instance.new("Animation")
	diveR6.AnimationId = "rbxassetid://9313688337"
	diveAnimR6 = Animator:LoadAnimation(diveR6)
	diveAnimR6.Priority = Enum.AnimationPriority.Movement
	diveAnimR6.Looped = true

	local diveR15 = Instance.new("Animation")
	diveR15.AnimationId = "rbxassetid://9313690927"
	diveAnimR15 = Animator:LoadAnimation(diveR15)
	diveAnimR15.Priority = Enum.AnimationPriority.Movement
	diveAnimR15.Looped = true
	
	local crawlR15 = Instance.new("Animation")
	crawlR15.AnimationId = "rbxassetid://9313812390"
	crawlAnimR15 = Animator:LoadAnimation(diveR15)
	crawlAnimR15.Priority = Enum.AnimationPriority.Action
	crawlAnimR15.Looped = true
	
	local crawlR6 = Instance.new("Animation")
	crawlR6.AnimationId = "rbxassetid://9313810264"
	crawlAnimR6 = Animator:LoadAnimation(diveR15)
	crawlAnimR6.Priority = Enum.AnimationPriority.Action
	crawlAnimR6.Looped = true
end
createAnims()
human.StateChanged:Connect(function(old,new)
	if hrp.Velocity.Y <= -120 then
		if old == Enum.HumanoidStateType.Freefall then
			if new == Enum.HumanoidStateType.Landed then
				hrp.Anchored = true
				hrp.Velocity = Vector3.new()
				diveAnimR6:Stop()
				diveAnimR15:Stop()
				wait(0.1)
				hrp.Anchored = false
			end
		end
	end
end)

UIS.InputBegan:Connect(function(key)
	if key.KeyCode == Enum.KeyCode.C then
		if human.RigType == Enum.HumanoidRigType.R15 then
			crawlAnimR15:Play()
		else
			crawlAnimR6:Play()
		end
	end
end)
UIS.InputEnded:Connect(function(key)
	if key.KeyCode == Enum.KeyCode.C then
		crawlAnimR15:Stop()
		crawlAnimR6:Stop()
	end
end)

while wait() do
	if hrp.Velocity.Y <= -120 then
		if human.FloorMaterial == Enum.Material.Air and human:GetState() == Enum.HumanoidStateType.Freefall and isPlaying == false then
			if human.RigType == Enum.HumanoidRigType.R6 then
				diveAnimR6:Play()
			else
				diveAnimR15:Play()
			end
			isPlaying = true
			repeat wait() until human.floorMaterial ~= Enum.Material.Air
			isPlaying = false
		end
	end
end

nvm i believe it has to do with r15, as i made my script for r6,
ill update you guys later

nvm the issue is persisting, i dont know why

What priority is the animation?

the animation priority is Action

Have you tried putting it to any other priority?

yes, I have tried doing Movement priority

also btw I have resorted to only doing r15 animations

ok so i just realized that the animation is playing, but only once, even though i did AnimTrack.Looped = true

the animationTrack:AdjustWieght() is not working

OK SO I FOUND THE ISSUE:

  1. you need to have a pre-made animation object(put it wherever, as long as client can access it)
  2. then, you just reference the animation object as a var, and animator:loadanimation(animationVar)

btw heres my code

local anims = script.Parent:WaitForChild(“anims”)
local crawl = anims:WaitForChild(“crawl”)
crawlAnimR15 = Animator:LoadAnimation(crawl)