No, they don't. SCOTUS has ruled that way two or three times.
https://en.wikipedia.org/wiki/Warren_v._District_of_ColumbiaIn a 4-3 decision, the District of Columbia Court of Appeals affirmed the trial courts' dismissal of the complaints against the District of Columbia and individual members of the Metropolitan Police Department based on the public duty doctrine ruling that "the duty to provide public services is owed to the public at large, and, absent a special relationship between the police and an individual, no specific legal duty exists". The Court thus adopted the trial court's determination that no special relationship existed between the police and appellants, and therefore no specific legal duty existed between the police and the appellants.
In the case of Parkland, I would view it that there was a special relationship. Peterson was not a cop on the beat who didn't respond to a call because he was responding to other calls (or sleeping in his black-and-white). He was being paid
specifically to be in that school, as the only armed police officer on the site. I respectfully submit that this created a "special relationship."
Secondly, as I noted above, he's not being charged with 34 or even 17 counts. He's being charged with 7 -- which I believe is based on the assumption that if he had acted appropriately, the people on the third floor might have been saved. I think that's reasonable.