vector2() dosent work as it should (FIXED BY ITSELF,DO NOT RESPOND)

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

so i wanted to make a object have a x velocity by using Vector2().x += speed like i did on my player scene. For some reason the object i was making wasn’t moving at all, even after i copied entire movement code from the player. Any idea what may caused it?

:bust_in_silhouette: Reply From: Wakatta


var speed = 4
var velocity = Vector2()

velocity.x += speed

Just plain wrong

Vector2().x += speed