Cannot change constant_linear_velocity

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

This is probably something really stupid that i’m not seeing, and the code is really simple. I have this code on my StaticBody2D:

extends StaticBody2D

func _ready():
	pass # Replace with function body.

func _physics_process(delta):
	if Input.is_action_just_pressed("ui_left"):
		get_node(".").constant_linear_velocity = -50

And everything works fine UNTIL i press ui_left, which gives me this error:

Invalid set index ‘constant_linear_velocity’ (on base: ‘StaticBody2D(Belt.gd)’) with value of type ‘float’.

Any ideas?

EDIT: my silky smooth brain just figured out that it wants a Vector2 from me, i am sorry for wasting your time