Animation not working

Hi,
I’m making a crawl animation for my game, but it’s not working correctly.

As you can see, when I press control, I start crawling, but once I start walking, my animation stops playing.

Gif of what Happens: https://gyazo.com/52b80d2badacd34fa3a2689f26a1aee2

Here is my layout:

Layout

Here is my script:

local UserInputService = game:GetService('UserInputService')
local Character = script.Parent
local Humanoid = Character:WaitForChild('Humanoid')
local crawlAnim = Humanoid:LoadAnimation(script:WaitForChild('CrawlAnim'))
UserInputService.InputBegan:Connect(function(Input)
	if Input.KeyCode == Enum.KeyCode.LeftControl then
		crawlAnim:Play()
	end
end)

Thanks for any help! The animation is looped.

Set your Animation Priority to Action

Visual:


image
image
image

I believe this is the issue. You will have to :Stop() the animation though
Sorry for the poorish visual. I was kind of in a rush.

1 Like