Error getting the transform of a child object.

I am trying to rotate a child object by its transform, but instead if the child rotating the parent does.

	GameObject lObject;
	Transform lTransform;

	void Start () 
	{
		lObject = new GameObject("lObject");;
		lObject.transform.SetParent(transform);
        lTransform = gameObject.GetComponentInChildren<Transform>();
	}
	
	void Update () 
	{
		lTransform.Rotate(Input.GetAxisRaw("Mouse Y"),0,0);
	}

GetComponentInChildren starts looking at this object, and then starts looking at the children. GetComponentInParent does the same thing.

This means that GetComponentInChildren will always return the transform of this object.

If you only have one child, you can do:

lTransform = transform.GetChild(0);