What is wrong with this code for an enemy

Godot Version

4

Question


This code is meant to make the enemy follow the player when it enters its area 2d child node the enemy looks at the player using some code but it doesnt follow Im following a tutorial by Kaan Alpar for top down shooter enemy ai to get an idea about enemy ai btw

You aren’t calling move_and_slide() inside _physics_process so it doesn’t move.