Tween says that a doesn't property exist even though it does.

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

Basically, I have a small tween here made for a cutscene that makes a copy player sprite fall.
tween.interpolate_method($CutsceneStuff/Player, "position", Vector2(120, -56), Vector2(120, 90), 3, Tween.TRANS_LINEAR)
The thing is that it says that the target ($CutsceneStuff/Player) has no method called “position”, even though it does (since it’s a Sprite (extends Node2D)). Does anyone know why?

I also made another animation but this time for the scale of the sprite, and it does the same thing (gives me an error saying that the node has no property called “scale” even though it does).
tween.interpolate_method($CutsceneStuff/Player, "scale", Vector2(1.2, 0.8), Vector2(1, 1), 0.5, Tween.TRANS_CUBIC)

Modley | 2022-12-30 08:41

:bust_in_silhouette: Reply From: Inces

position is a property, not a method. Use interpolate_property