I have lots of memories of this. They’d show us films about road safety (actual films, on a reel-to-reel projector, in the 1980s). They also passed round a truncheon for us to feel, handcuffed the teacher, and demonstrated how a police dog would catch a burglar; unfortunately they couldn’t get the dog to let go when it was meant to!
We once had a policeman visit our secondary school to talk
about more serious matters. One of the boys insightfully asked him if he loved his job.
More recently, I’ve seen the police at my local school with a speed detector, surrounded by children in hi-vis.