Help with blending animations

  1. What do you want to achieve? Keep it simple and clear!

I want that my custom crouch running/walking animation blends in smoothly with my crouch idle animation like the default roblox animations

  1. What is the issue? Include screenshots / videos if possible!


as you can see one leg blends in smoothly with the idle position but if i stop moving with the other leg then it looks off

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

I didnt found something that could really help me with that, im very new to this stuff

If you’re stopping the animation with :Stop() when you stop moving, then u can take advantage of the fadeTime parameter. Maybe that could work

when i do it and i stop moving the character is standing up and then going into crouch stance

are u using the fadeTime for when you are playing the animations as well?

im just using Play and Stop

local function onInput(inputObject, gameProcessed)
	if gameProcessed then return end
	
	if inputObject.KeyCode == Enum.KeyCode.C then
		if not isCrouching then
			isCrouching = true	
		
			-- activates crouching here
			
			humanoid.WalkSpeed = 8
			hrp.Running.PlaybackSpeed = 1
			ts:Create(camera, TweenInfo.new(0.3), {FieldOfView = 60}):Play()
			
			crouch_idle_animation:Play()
			
		else
			isCrouching = false	
		
			-- deactivates crouching here
			
			humanoid.WalkSpeed = 16
			hrp.Running.PlaybackSpeed = 1.55
			ts:Create(camera, TweenInfo.new(0.3), {FieldOfView = 70}):Play()
			
			crouch_idle_animation:Stop()
			crouch_running_animation:Stop()
			
		end
	end
end

local function onRunning(speed: number)
	if speed > 0 then
		-- is moving
		
		if isCrouching then
			crouch_idle_animation:Stop()
			crouch_running_animation:Play()
			
		end
		
	else
		-- is not moving
		
		if isCrouching then
			crouch_running_animation:Stop()
			crouch_idle_animation:Play(0.3)
		end
		
	end	
end

use the fadeTime every time you use stop and play and see if that makes the transitions between animations smoother.

1 Like

i just found out that i just had to edit the animation so both legs are in the same position on beginning but thanks for your help

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.