Some parents are really a good teacher -while the other remain in limbo what to do or what not to do.
This creates problem for both kids and the family. This also widens the gap and it remains with them for ever.
If you are a good parent then you will instinctively be able to guide your children in the right direction and teach them what to do or can not to do at a young age.
There must be a reason on why kids rebel and won't obey their parents. It could be because their parents have done something bad in the past or like you said they are busy and they lack of time or attention for their kids but not all kids are going to remain like that forever. If parents learn to regret and admit their past mistakes then kids can too.
if your child sees you gambling then they gamble and you forbid it then you are a selfish parent, every child needs guidance and rebellion usually occurs because they feel they are being treated unfairly, fix yourself first as a parent, then rebellion from your child - you will not receive it.