Turret

Hello all, so after a long break I’m back into unity, started watching a tutorial on a turret. Started making one and when I get up to the turret moving around, if the player is in range, it starts facing the player. It works, but doesn’t. What’s happening is it moves with the player, but is facing 90 degrees away from it, not sure why, but also when I click play, it automatically turns 90 degrees. that could be the reason, but there’s no reason why it should? If any info is needed please ask.

This is the tutorial I’m following:

Just to explain it better, when I click play the y rotation of the neck of the turret goes from 0, to 90

EDIT: Okay so after adding some other checks and stuff, I found that it happens when the player comes into range with the turret. Whats wrong with this?

public override void OnTriggerEnter(Collider other)
    {
        if(other.tag == "Player")
        {
            parent.Target = other.transform;
            parent.ChangeState(new FindTargetState());
        }
    }