A grandfather scared a 13-year-old girl by making a sexual suggestion to her in a park, Worcester Crown Court heard.
Next day Ronald Brown, who suffered from schizophrenia and had 20 cases of indecent exposure on his record, banged on the victim's windows, but she locked the door and phoned a friend.
Brown, aged 76, of Ryefields Road, Stoke Prior, pleaded guilty to inciting a child to engage in sexual activity.
Judge Andrew Geddes said Brown had been "a social pest" in the past and could have been jailed.
But he had a long history of mental illness, including a psychotic condition and a personality disorder.
Giving him a three-year community rehabilitation order, the judge said: "The duty of the court is to do all in its power to protect children from adults who wish to exploit them sexually."
Sally Hancox, prosecuting, said Brown approached the teenager on June 3 last year and asked her if she wanted "to suck his lollipop". He conceded to police the comment was sexual.
The girl and a friend left the park near her Stoke Prior home, but Brown went to her address next day. In a phone call, the girl alerted another friend and the defendant left when she arrived.
Brown had a conviction for indecent assault in 1953, said Miss Hancox, and repeatedly committed indecent exposure between 1954 and 1977.
But Adam Western, defending, said he then stopped offending due to anti-psychotic medicine and close supervision by the psychiatric services.
Mr Western claimed that psychiatric help had been reduced over the last two years, resulting in the park incident.
Brown had been married for 30 years, he said, adding: "He really regrets the words he used and mercifully it went no further. Prison would have been cruel for someone of his age."
Judge Geddes ordered Brown to sign the sex offenders' register for five years.
Comments: Our rules
We want our comments to be a lively and valuable part of our community - a place where readers can debate and engage with the most important local issues. The ability to comment on our stories is a privilege, not a right, however, and that privilege may be withdrawn if it is abused or misused.
Please report any comments that break our rules.
Read the rules hereComments are closed on this article