From your description and error message, it looks like HitPoint is a Vector2 and not a node.
Have your tried HitPoint = RayCast2D.get_collision_point()?
More context would help to pinpoint the problem.
Sorry, I didin’t clarify, yep, HitPoint is a variable, intended to be used to then change the node position (“Node2D.position = HitPoint”), so yea is not a node, I’ve tried what you recommend, but got the same issue, returns a Vector2, can’t use it for position
It would help, if you could show the exact error message and your code, that the error points to.
Also a Vector2 represents a position (a 2D-position).
I got a solution:
Setting a Vector2 directly into a position gives you an error, but setting x and y separately works fine by some reason, something like this:
HitPoint = RayCast2D.get_collision_point()
Node2D.position.x = HitPoint.x
Node2D.position.y = HitPoint.y
Is literally the same result that “Node2D.position = HitPoint” but Godot doesn’t take it wich is really weird, in Unity you can use Vector2 and positions as equals, hope that we can make the same in Godot in a future