If somebody's child necessarily had to die for some strange reason, that could be arranged without involving the parent. Murder is contrary to love, and therefore contrary to God. Accordingly, God wouldn't order anyone to kill his/her child, since that would be to act against himself. Therefore the whole scenario is inapplicable as I see it.
I don't have any children. Would it be ok if I killed somebody else's kids?
Don't worry, it's really no bother. I already have a few kids in mind.
For all those who don't believe their God would kill children, what God do you believe in? Surely not the God of the Bible