Hey I am having trouble with getting the global position of another node but when I type in .global_position it is not found as an option, but have been stumped for a while on this one I was hoping I could get some help on this one.

If needed here is my code:

extends Area2D

const playerpath = preload('res://player.tscn')

@export var move_speed : float = 150.0

func _physics_process(delta):
var player = get_node('player')
var player_global_position = player.global_position

global_position += (player_global_position - global_position) / 50
look_at(player_global_position)

    Mark21911 What class is player?

    Try casting your player to for example a Node2D, which has a global_position property:

    var player = get_node("player") as Node2D

    Mark21911 preload('res://player.tscn')

    That creates a PackedScene, but where do you create an instance of it and add it to the scene tree?