Turn script does not work

Recently I made a rotation script so that once the guard detects a player, it will turn towards them and give the player a second to run before it begins chasing. However for some reason, when the guard begins to turn, they turn away from the player, rather than towards them
Here is a copy of my code(highlighted is everything directly related to the patrol script):

figured it out