Ezek. 18:20: The soul who sins is the one who will die. The son will not share the guilt of the father, nor will the father share the guilt of the son. The righteousness of the righteous man will be credited to him, and the wickedness of the wicked will be charged against him (NIV).
As parents, our sin will have an effect on our children, but it is important to remember that our sins will not condemn our children. Praise God! This verse illustrates how, ultimately, we are accountable to God for our own actions. Our children will be accountable for their sin, not ours. We are accountable for our sin, not the sins of our children.
Are you hurting because you blame yourself for your child's sin? Confess your part to God and your children and ask for forgiveness, but remember, no matter what mistakes you made as a parent, each individual is called to personal accountability. The spiritual example set by parents, good or bad, does not exempt a child from needing their own personal relationship with Christ or being accountable for their choices.
Rest in the fact that God is loving, forgiving, and righteous and know He is bigger than your mistakes.