If parents set a bad example, children can still learn better habits, but they might learn by deciding NOT to be like the parent, but rather to be like another adult they respect more. It might be a karate teacher, or a friend's parent. That is NOT good for the relationship, and can affect the parent/child relations for decades.
The above was written in a longer discussion, where I didn't mention that the children might not learn better habits, but might settle for behaving as badly as the parents.
Be the way you hope your children will be.
Thoughts on Respect, by Robyn Coburn
photo by Rippy Dusseldorp