As parents point children to see not just the good in you but the bad in you. Don’t make it look like you are perfect and whatever you do and do not do is the right thing.
Children emulate by default. They learn by mirroring the people around them. They even speak with the same tone and accent that they are spoken with. Their vocabulary is made up of the words you speak with them. Their expressions are influenced by yours. They even mirror your value system. That is why if at times, your behaviour or language or thinking is improper, point it out to them. Tell them that it is not proper and they must know it. Also, assure them that it’s something that you are aware of and that you are working on it and are trying to be a better person.
Otherwise, they will never learn to tell the difference between right and wrong, proper and improper, appropriate and inappropriate. At least they will not be able to learn this from you. The teaching from the books will appear to conflict with the world outside their curriculum and school and they may choose then to take neither seriously.
When, once in while, you point out the flaws and weaknesses in your own thinking and behaving to children, even they will start stepping out of their own picture, and learn to introspect and look at themselves objectively. This ability to objectively introspect is a life skill that will serve them well in the long run.
Love grows and blossoms where there is honesty. And don’t think that they won’t understand it or will judge you or hate you. They will respect you even more. Try.