How do i make the climbing animation work correctly?

I am working on creating climbable ropes, but i cant figure out how to get the climbing animation working correctly.


How do i make the player climb depending on the movement?

This is how i do it right now:

Humanoid:ChangeState(Enum.HumanoidStateType.Climbing)

Humanoid.StateChanged:Connect(function(oldState, newState)
	if IsClimbing == true and newState ~= Enum.HumanoidStateType.Climbing then
		Humanoid:ChangeState(Enum.HumanoidStateType.Climbing)
	end
end)

i am not that experienced but arent you supposed to put anim:play?

1 Like

The animation handler should handle all of that.

I need to find out a way to make the animation handler compatible with custom climbing parts.

1 Like

youre trying to achieve that when a player grabs on to the rope the climbing animation begins?

1 Like

I want the climbing animation to work just like on trussparts.

1 Like

This is most likely a bad idea and won’t work but you can try adding invisible cylinder parts inside the rope that stick out. If that is not something you want to do you can also look into how other people make ladders.

1 Like

this might help you here

`

1 Like

The climbing part is done already as i showed in the video, but i just need the animation to work correctly.

1 Like

the link i sent Using Animations | Documentation - Roblox Creator Hub has a way to change default animations

1 Like

Oh yeah my bad. You can try to call the animation to see if there really is a difference or not. I know ChangeState should handle it but personally have had some issues in the past. Other than that I am not too sure and don’t have much experience with ladders myself. Looking at it again a suggestion is to try disable any falling states to avoid overriding the climbing.

1 Like

i think this could help :D. this script help me with the climb animation :

local isClimbing = false
humanoid.StateChanged:Connect(function(_oldState, newState)
	if newState == Enum.HumanoidStateType.Climbing then
		if not isClimbing then
			isClimbing = true
			climbAnimTrack:Play()
			idleAnimTrack:Stop()
			runAnimTrack:Stop()
			jumpAnimTrack:Stop()
		end
	elseif newState == Enum.HumanoidStateType.Landed then
		if isClimbing then
			isClimbing = false
			climbAnimTrack:Stop()
			idleAnimTrack:Play()
		end
	end
end)