If a sentence opens with a modifying phrase, the noun right after the comma must be what that phrase describes. If it is not, the modifier is dangling. Walking into the room, the chairs were already set is wrong. The chairs were not walking. Placement as a whole is in modifier placement.
Name the actor
After the comma, put the person or thing doing the opening action. Walking into the room, Maya saw the chairs already set. Fixing the opener by rewriting it as a clause also works: When Maya walked in, the chairs were already set.
Gerunds and infinitives in those openers are in gerund versus infinitive. Introductory commas are in commas after introductory clauses. Grammar overall is in ACT grammar rules.
The bottom line
Opening phrase, comma, then the noun that actually did that action.
Start practicing
Start with a free diagnostic, then drill your weak spots with 15-question quizzes and track how you're doing across Reading, English, and Math. Compare plans whenever you're ready to go further.
This article offers general ACT prep guidance. The ACT can change from year to year, including its format, scoring, policies, test dates, and fees, so always confirm the latest details on the official ACT website at act.org before you make decisions. ACT® is a registered trademark of ACT, Inc. thirty-six is not affiliated with, endorsed by, or sponsored by ACT.