From my point of view, to a certain age, parents are a model for the child, whether or not people recognize it, man is an influential being, and the more a child is highly influenced by the parents.
On the one hand, parents explain to their children the mistakes they made in the past, not to repeat their children the same. Many parents teach their children not to smoke, although they still do it, precisely because they know it was a mistake to do the same thing. In the case of a friend, his mother smokes for 20 years, although he knows he is not well, he taught him that there is no benefit in this.
On the other hand, parents influence their child, and through the deeds committed, whether they realize it or not, the child is influenced by anything his parents do, whether positive or negative. Young people acquire behavior, perception, qualities or defects in the influence of their parent. For example, my cousin, at age 15, started to smoke, although she was advised not to do so, following the visible example her parents had shown her probably without imagining she would.
In conclusion, a parent has a responsibility to be a good model to follow for a child, and to use the influence he has on him to form a good child in the future.