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:
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.