We had some kids persistently knocking on the door a year or two ago. Not knocking and running off, knocking then being leary when we answered it.
So I went out with my caamera + big flash behind my back, whipped it out, took their pictures, then as they stood there calling me a pedophile and swearing at me, phoned the police. The kids ran off but the police came along recognised them then went to see their parents.
Seemed to work.
In our area, where the kids are more annoying than truly dangerous (I think) they seem to have a lot of bravado when they think they are anonymous, but not much after.
Saw, one of these kids with his mate after school a while later whilst I was with my own little kids. Stopped him in the street and asked him why he'd done it, what he thought it said about him, whether he thought it was OK to knock our door while I was putting our kids to bed etc. Embarrassed the little fcker in front of his mate and passing members of the public – ha ha.