Strange rotation problem? need to remove then re-Add Component

hello, I’m creating a side scroller - when the character gets to the end of a level, the camera changes to a top down view of the Boss Area - all of this works great, except in order for my character to fire projectiles at the mouse (using MouseLookAt script), I have to rotate the players mesh -90 degrees as soon as he enters the play area

public class PlayerMeshRotation : MonoBehaviour 
{
	public int useLookAt;

	void Start ()
	{
		useLookAt = 0;
	} 
	
	void Update()
	{
		useLookAt = PlayerMovement.lookAt;

		while(useLookAt == 1)
		{
			transform.Rotate (0,-90,0);
			break;
		}
		if(useLookAt == 1)
		{
		useLookAt = 2;
		}
	}

}

However, the first time I load the scene, this doesn’t work - I have to “Remove Component” (that script), then “Add Component” (that same script) - resetting the script does nothing. Any ideas whats happening?

Are you setting PlayerMovement.lookat in the Inspector?
I’m wondering if PlayerMovement.lookat is being changed somewhere before loading the scene (or perhaps it is retaining it’s value from the previous scene), but if you have it set to 1 in the Inspector then reloading the component would allow the script to work? Just a thought.