Open the Player Scene, Select the AnimationPlayer, Add a new Animation called climb, Set Length to 0.4s, Turn on Looping, The keyframe sequence for the Sprite2D Frame property are:
Add a new player state: CLIMB
Add an export variable for climb speed
Add a boolean to check if on ladder
To include the animation for CLIMB
In Project => Project Settings => Input Map
Add variables for climbing up and down
Check if on a ladder and not climbing yet
Change velocity appropriately
Turn off gravity when on a ladder
Select the WorldLayer node
Open the TileSet tab at screen bottom
Make sure the ladder is not painted with
Select the Custom Data Layer
Choose Special and type ladder
entering a ladder
exiting a ladder
Make a create ladders function
To scan the tilemap for ladder tiles
And add collisionshapes around them
Call the create ladders function
At the end of the ready function
Play Test the game and see if you can climb up and down ladders