How do i fix the invalid call. nonexistent function 'length' in base 'vector2' issue

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By ExpNeeded

I got this code from a platformer tutorial by heartbeast and i encounter this issue

i tried to fix it but it failed

what should i do

here is the script

func climb_state(input):
if not is_on_ladder(): state = MOVE
if input.lenght() != 0:
animatedSprite.animation = “RunAnim”
else:
animatedSprite.animation = “IdleAnim”
velocity = input * 50
velocity = move_and_slide(velocity, Vector2.UP)

:bust_in_silhouette: Reply From: kidscancode

You’ve spelled length() wrong: “lenght”

:bust_in_silhouette: Reply From: phteven

You spelt length wrong.
it’s length, not lenght.