I am trying to make a game where you climb a ladder up and down.
so far I am using an area 2d and attaching a script to call a function on the player to press a button to ascend the ladder, but the player doesn't ascend the ladder
Here is the function code:
motion.y = 0
motion.y -= speed
motion.y += speed