Player enemy with raycast 2d stuck in different position

Godot Version



Hey, I’m having some trouble with the brackeys godot tutorial, were as the enemy movement, when it’s placed in a place for it to move left and right when colliding with the wall it just randomly changes position and get stuck somewhere as I press play…