error: setting property "global_position" with value of type float - how could I solve it?

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

func shoot_at_mouse_5_up(start_pos):
	self.global_position = start_pos
	var direction = (player.position - start_pos).normalized()
	self.linear_velocity = direction * speed

How could I solve it? Is it possible to solve with an integer value? If it is, how could I convert global.position rounding a integer value?

:bust_in_silhouette: Reply From: supagu

It sounds like start_pos is a float such as 4.5, what you want to pass in is a Vector2(x, y).