In a street life, you want to hurt others who come from a different turf from you. You want to sell drugs to make easy money. You want to commit numerous zina because it makes you feel like a "real man". You want to drink alcohol, smoke weed and take other forms of drugs like sippin lean, poppin pills and etc. It's a very sinful lifestyle that goes against Islam in every principle.
One way to counter such filthy lifestyle is having parents with strong religious values who make their children pray 5 times a day, fast during Ramadan, take them to madrassa so they can finish Qu'ran and Hadith at a young age. Teach them what's right and wrong in our religion and you'll see the positive impacts it can have in their life. They will become religious and focus on their studies in school. They will become good kids and I've seen this with my own eyes of kids who live in the complex but are good people because they had parents with strong religious values.
Yes, the environment can play a role sometimes but everything goes down to parenting.