A single object pronoun in French is easy — it just slots in right before the conjugated verb. The trouble starts once two pile up at the same time, because French doesn't always put the indirect object pronoun in the same slot relative to the direct one. Whether lui and leur land before or after le, la, and les depends entirely on which pronoun is doing the indirect-object job.

The short version

Me, te, nous, vous, se always come before le, la, les. Lui and leur come after le, la, les instead — and y, then en, trail behind everything else in the stack.

Me/te/nous/vous first

1st/2nd person (or reflexive) pronoun + le/la/les

il me le donneelle te la montrenous nous les rappelonsje vous les envoie
Il me le donne.
He gives it to me.
"Me" (indirect, who receives it) comes before "le" (direct, the thing itself)
Elle te la montre.
She shows it to you.
Same order: "te" before "la"
Je vous les envoie demain.
I'll send them to you tomorrow.
"Vous" still leads, even with a plural direct object

Le/la/les first

le/la/les + lui/leur (3rd person indirect)

il le lui donneelle la leur montreje les lui envoie
Il le lui donne.
He gives it to him/her.
With a 3rd-person indirect object, the order flips -- "le" now comes before "lui"
Elle la leur montre.
She shows it to them.
Same flip: "la" before "leur"
Je les lui envoie demain.
I'll send them to him tomorrow.
The direct object still leads whenever the indirect object is lui or leur

Il me le donne quand je le demande, mais il le lui donne seulement si elle insiste.

He gives it to me when I ask, but he only gives it to her if she insists.

Same verb, same two objects, same meaning of "give it to (someone)" -- but swap the recipient from "me" to a third person like "her," and the order reverses: "me" can never follow "le"; "lui" can never precede it. Y and en, when they show up alongside other pronouns, always trail at the very end of the stack, after both of these pairs.

Think you've got it?

Take the quiz and see if you can get the pronoun order right every time.