Need Help with Pacman Clone not Working Properly

Godot Version

4.1.2

Question

Hello everyone,

I am making a pacman inspired game with my own sound effects, level designs, and physics/mechanics so it’s not a direct ripoff, but sadly after I followed the directions to make a 2D game with the official “Dodge the Creeps” tutorial in the Godot manual to the best of my ability, the enemy does not turn when it hits a wall even though I specified it should very carefully in the code.

Link to Game for Public Download

Does anyone have any insight as to what I am doing wrong? Thank you very much in advance.