A child only really learns from your actions and your words.
I have seen so many parents try to teach their child not to be like them. They yell and hit their child to teach them not to yell and hit other kids. They ignore their child when they feel their child is not dealing with their problems. They tell their child to go upstairs and study while they themselves are watching TV and relaxing.
You can't tell your child to do things you yourself don't do. In my own personal life, I used to be so afraid of my many shortcomings, afraid that I would pass them on. Recently, I have had a change of heart. These shortcomings are an opportunity to model for my child how one should struggle with their own bad behaviour, and how an adult strives to overcome them. It will also teach them that the goal isn't to be perfect but rather to always work to perfection.
To my Ethiopian parents, who at this very moment are saying "I was hit by my parents and I turned out fine". I have met many parents of many children, parents who want their kids to grow up to be like them. I have to say, there is quiet a gap between the angry, hurt and barely surviving individuals the parents emotional states have made them, and the perfect self-image they have of themselves. So, if at this moment, as you read this, you are doubting whether any of this applies to you, trust me it does. In fact, lack of self-doubt is one of the biggest signs of lack of self-awareness, a sign that the grandparents didn't do a great job of helping you come to terms with the idea that you are imperfect.
Take my advice, especially you parents with young kids. Rather than be surprised when your kid grows up into a hard to relate to adult, invest now in helping him/her and yourself become better. If you feel you are ill equipped, there is no shame in seeking help. In fact, that is the greatest example you can set.
An adult is self-sufficient, until he/she is not. That is a great lesson to pass on.