My crawl animation is broken!

Hi, my name is Bryan and I’m a developer who doesn’t know much about animations and etc, and I’ve been trying recently to make a crawling animation, the only problem is that the animation when played is totally crooked, and that prevents me from being able to go through lower places, I’ve been looking for a solution for days but I never found it, neither in forums, nor in videos nor in scripting help sites, I hope someone can help me with this, I’m desperate!

In the animation editor, the animation plays correctly, but in the game, it says completely dropped!

In the animation editor:

In the game:

Script to run the animation:

local CAS = game:GetService("ContextActionService")
local player = game:GetService("Players").LocalPlayer
local char = player.Character or player.CharacterAdded
local human = char:WaitForChild("Humanoid")
local anim = char:WaitForChild("CrawlAnim")
local loadAnim = human.Animator:LoadAnimation(anim)

local guis = script.Parent.Parent
local activateFeatures = guis.ActivateFeatures
local crawling = guis.Crawling
local paused = guis.Paused

local active = false

activateFeatures.Event:Connect(function()
	active = true
end)

function Crawl(actionName, inputState)
	if active and not paused.Value and inputState == Enum.UserInputState.Begin then
		if crawling.Value then
			crawling.Value = false
			loadAnim:Stop()
			human.CameraOffset = Vector3.new(0, 0, 0)
			human.WalkSpeed = 12
		else
			crawling.Value = true
			loadAnim:Play()
			human.CameraOffset = Vector3.new(0, -2, 0)
			human.WalkSpeed = 8
		end
	end
end

CAS:BindAction("Crawl", Crawl, true, Enum.KeyCode.LeftControl)
CAS:SetPosition("Crawl", UDim2.new(0.65, 0, 0.35, 0))
CAS:SetImage("Crawl", "rbxassetid://9215224840")

Please if anyone knows what to do help me out, I’m totally exhausted from looking everywhere, thanks to everyone who can help me!

1 Like

Have you tried setting your Animation Priority to Action?

loadAnim.Priority = Enum.AnimationPriority.Action

2 Likes

IT’S WORKED! THANKS!! <3
You helped me a lot!

1 Like