OnMouseDrag() don't work on childs?

I have a mouse drag function to move an object to where the mouse are, and works fine, but when i put into an gameObject it simply doesn’t work. Sorry for my english, i dont’t write so well…

void OnMouseDrag() {
	transform.position = Camera.main.ScreenToWorldPoint(new Vector3(Input.mousePosition.x, Input.mousePosition.y, 10));
}

Does your child have a collider of its own? To work, the GameObject an OnMouse… is on must also have a collider.