Custom animation issue

  1. What do you want to achieve? I wanna make the players have custom R6 animations

  2. What is the issue? Almost everything works fine but after sprinting then i jump, it plays walk animation instead of idle, and when i jump it doesn’t play fall animation

  3. What solutions have you tried so far? I looked through dev forum but none helped with my issue
    here’s my fall animation local script (i included only this)

local walkAnimation = script:WaitForChild("Walk")
local jumpAnimation = script:WaitForChild("Jump")
local idleAnimation = script:WaitForChild("Idle")
local runAnimation = script:WaitForChild("Run")
local fallAnimation = script:WaitForChild("Fall")

local Char = script.Parent
local Humanoid = Char:WaitForChild("Humanoid")

local animationTracks = {
	Walk = Humanoid:LoadAnimation(walkAnimation),
	Jump = Humanoid:LoadAnimation(jumpAnimation),
	Idle = Humanoid:LoadAnimation(idleAnimation),
	Run = Humanoid:LoadAnimation(runAnimation),
	Fall = Humanoid:LoadAnimation(fallAnimation)
}
Humanoid.Jumping:Connect(function()
	playAnimation(animationTracks.Jump)
end)

animationTracks.Fall.Stopped:Connect(function()
	if Humanoid:GetState() == Enum.HumanoidStateType.Freefall then
		playAnimation(animationTracks.Fall)
	elseif Humanoid.MoveDirection.magnitude == 0 then
		playAnimation(animationTracks.Idle)
	end
end)

1 Like