A participial phrase at the beginning of a sentence must refer to the grammatical subject.
For example: Walking slowly across campus, he (the subject) saw a professor accompanied by two students.
The word walking refers to the subject of the sentence, not to the professor. To make it refer to the professor, the writer must recast the sentence.
For example: He saw a professor, accompanied by two students, walking slowly across campus.