yeah. Any help would be appreciated and I will provide other trees and nodes. Thanks in advance.

Tween refers to the class. $Tween would refer to the instance (object) of that class in your scene. So replace Tween with $Tween. Compare how you referred to Timer object

You'll probably have the same problem with KinematicBody. But since you're referring to it from within its own script, you should use keyword self.

To put it in code: $Tween.interpolate_property(self, vector.y, 1, -1, 1, 0, 1) $Tween.start()

I don't think you want to (or even can) name variables the same as reserved keywords.

@DaveTheCoder said: Or add at the top: onready var Tween = $Tween

It'll work but I don't think this is a good practice in general. It'll make class inaccessible in the script scope. May generate further confusion down the line. Better to use some other name that's different from class name.

Personally I would probably use: onready var tween: Tween = $Tween

I was just providing a minimum change.

@cybereality said: I don't think you want to (or even can) name variables the same as reserved keywords.

I tried it out of curiosity. It runs without complaints but you lose access to the class in the script scope.

In this specific case it may break your future code as you typically need class constants when calling various interpolate* functions.

Nice to know it works, but would still be poor form and very confusing.

@cybereality Yep. It would actually be better if it didn't work :) Maybe developers should think about forbidding this in future versions. It'll break backwards compatibility though.

a year later