But the children of those officers were not killed. The LORD had commanded in the Law of Moses that only the people who sinned were to be punished, not their parents or children.
Only those who sin will be put to death. Children won't suffer for the sins of their parents, and parents won't suffer for the sins of their children. Good people will be rewarded for what they do, and evil people will be punished for what they do.
Suppose I promise good people that they will live, then later they start sinning and believe they will be saved by the good they did in the past. These people will certainly be put to death because of their sins. Their good deeds will be forgotten.
When I tell wicked people they will die because of their sins, you must warn them to turn from their sinful ways. But if you refuse to warn them, you are responsible for their death.
Parents must not be put to death for crimes committed by their children, and children must not be put to death for crimes committed by their parents. Don't put anyone to death for someone else's crime.