She told the children to come into the room.

Literal

She [topic-は] children [target-に] room [into-に] enter [so as to-ように] told.

The indirect-command frame ~ように言う carries the structure here: the embedded clause 部屋に入る is the content of the order; ように nominalizes it as 'to do X'; 言った reports the speech act. Note how Japanese stacks two に in close succession with different functions: 部屋に (destination of entering) and 子供たちに (recipient of the speech act). Each is unambiguous because they serve different roles in different clauses.