am making a shooting system and am getting a lerp error saying - "lerp()" call. expected at 3 most. this is my code

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

extends Sprite

func _ready():
set_as_toplevel(true)

func _physics_process(delta):
position.x = lerp(position.x, get_parent().position.x, 0.5)
position.y = lerp(position.y, get_parent().position.y, +10, 0.5)
var mouse_pos = get_global_mouse_position()
look_at(mouse_pos)

:bust_in_silhouette: Reply From: timothybrentwood

Looks like:

position.y = lerp(position.y, getparent().position.y, +10, 0.5)

should be:

position.y = lerp(position.y, getparent().position.y + 10, 0.5)

Should be “get_parent()”