Wrong: Il faut lui faire attention
Right: Il faut faire attention à lui, Il faut y faire attention
Explanation: "To pay attention to" is faire attention à in French. Normally, the preposition à plus a person can be replaced by an indirect object pronoun, but the phrase faire attention à is an exception.* You can't say il faut lui / leur / me faire attention; what you can say depends on whether the object is a person or thing.
People: To say "you have to pay attention to (someone)," you must keep the preposition à and indicate the person with a name, noun, or disjunctive pronoun:
- Il faut faire attention à Paul / à Martine / à Luc et Agnès.
- Il faut faire attention à ton prof / au médecin / à vos parents.
- Il faut faire attention à lui / à moi / à eux.
- Il faut faire attention à ceci / cela / ça.
- Il faut y faire attention.

