how to merge object same as Parent Child ?

Hi,

I have Object A and Object B. now i want to attached both the ojects. So i have make Object A as parent of Object B .But the problem is that if i move Object B then object A is not moving but if i move Object A then object B moves prefectly. So please any body help me ?

For Drag the object i am using bellow code:

void OnMouseDown ()
	{
		
		if (isEnable) {
			
			screenPoint = Camera.main.WorldToScreenPoint (gameObject.transform.position);
     
			offset = gameObject.transform.position - Camera.main.ScreenToWorldPoint (new Vector3 (Input.mousePosition.x, Input.mousePosition.y, screenPoint.z));
		
		}
			
	}
     
    void OnMouseDrag ()
	{
		if (isEnable) {
			
			Vector3 curScreenPoint = new Vector3 (Input.mousePosition.x, Input.mousePosition.y, screenPoint.z);
     
			Vector3 curPosition = Camera.main.ScreenToWorldPoint (curScreenPoint);
			transform.position = curPosition;
			
    
		}
	
	
	}

Thanks
Yashesh.

As per our discussion in the comments above, put the script back on the children and change it to this:

void OnMouseDown ()
    {
 
       if (isEnable) {
 
         screenPoint = Camera.main.WorldToScreenPoint (transform.parent.gameObject.transform.position);
 
         offset = transform.parent.gameObject.transform.position - Camera.main.ScreenToWorldPoint (new Vector3 (Input.mousePosition.x, Input.mousePosition.y, screenPoint.z));
 
       }
 
    }
 
    void OnMouseDrag ()
    {
       if (isEnable) {
 
         Vector3 curScreenPoint = new Vector3 (Input.mousePosition.x, Input.mousePosition.y, screenPoint.z);
 
         Vector3 curPosition = Camera.main.ScreenToWorldPoint (curScreenPoint);
         transform.parent.transform.position = curPosition;
 
 
       }
 
 
    }

Now the script moves the parent, empty GameObject when you drag the children.