Exodus 34:7 (NKJV) "keeping mercy for thousands, forgiving iniquity and transgression and sin, by no means clearing [the guilty,] visiting the iniquity of the fathers upon the children and the children's children to the third and the fourth generation."
Exodus 34:7: The Lord is merciful, gracious, and long-suffering but not forever suffering. His holiness demands that justice be served. He may defer His judgment, but it will come. For those who have accepted Jesus' payment for sin, there will be no judgment except to receive rewards (1 Corinthians 3:12-15). Jesus drew all judgment to Himself (John 12:32). But for the ungodly, who refuse to receive Jesus as their substitute, a day of judgment is coming that will be terrifying for them.
This curse on the children of those who sinned was later rescinded in Ezekiel 18:2-4 and Jeremiah 31:29-30. Christ redeemed us from the curse of the Law (Galatians 3:13).
Ezekiel 18:2-3 (NKJV) "What do you mean when you use this proverb concerning the land of Israel, saying: 'The fathers have eaten sour grapes, And the children's teeth are set on edge'?  "[As] I live," says the Lord GOD, "you shall no longer use this proverb in Israel.
Jeremiah 31:29-30 (NKJV) "In those days they shall say no more: 'The fathers have eaten sour grapes, And the children's teeth are set on edge.'  "But every one shall die for his own iniquity; every man who eats the sour grapes, his teeth shall be set on edge.