Transform.Rotate a child object can't get it to work.

Hi, I have a particle system in attached to a child object behind a plane, acting as the exhaust. The play flips depending on the direction it’s facing, however the particle system doesn’t. I figured I have to rotate the transform of the child object in order to properly align the emission direction to the plane. I’m using this code, and somehow it ends up rotating the plane itself.

private Transform exhaust;

void Start () 
	{
		myTrans = transform;		// Cache the transform component
		exhaust = GetComponentInChildren<Transform>(); // Get the transform of the particle system.


		if (myTrans.position.x > 0)	//Define the direction of travel based on starting location
		{
			speed *= -1; 
			Flip();
		}

		Debug.Log ("Current rotations is:" + exhaust.rotation);


void Flip ()
	{
		// Switch the way the player is labelled as facing.
		facingRight = !facingRight;
		
		// Multiply the player's x local scale by -1.
		Vector3 theScale = transform.localScale;
		theScale.x *= -1;
		transform.localScale = theScale;
		exhaust.Rotate (0,180,0);

I solved my own problem, the solution was that instead of using exhaust.Rotate I should’ve used exhaust.localRotation.

Your problem most likely stems from this line exhaust = GetComponentInChildren(); // Get the transform of the particle system.

Are you certain that there is only one child object? You should probably store the transform of the exhaust via the inspector just to make sure that you are getting the exact transform that you want.