Help this keeps happining

@uses_a_steam_deck there are two issues here. First, the get_position() method does not exist on the CharacterBody2D node. Second, you are attempting to make a call on the player node before it has been instantiated in the scene. You need to set those variables in the _ready() method. At that point the main node is added to the scene and all of it’s children nodes, e.g. player, have been instantiated. Basically, you’re trying to work with the player node before it has been instantiated. Same will go for the enemy access on the line below.

bro thanks alot i have been trying for hours how did i not think of get_position() not working on that node

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.