An introductory participle clause must logically attach to the subject of the main clause.
'Walking in the park, a snake bit him' is wrong — write 'While he was walking in the park, a snake bit him'!