The soul who sins dies. The son won't bear the punishment of his father's sin and the father won't bear the punishment of his son's sin. The righteous deeds of that righteous person will be attributed to him, while the wicked deeds of the wicked person will be charged against him. 