Confucius said this quote

Worthy admonitions cannot fail to inspire us, but what matters is changing ourselves. Reverent advice cannot fail to encourage us, but what matters is acting on it. Encouraged without acting, inspired without changing – there’s nothing to be done for such people.