Children learn by solid examples.
When they see someone close to them who operates in an optimistic mindset and as a result has a better life they will take notes and take heed.
If they desire better results from their life and they see that this way of thinking can generate them; they will change up when they get tired of the outcomes that they are generating now.
Once they become tired of the negative results they will seek a new way to gain new results.
Present to them solid situations that they can study on their own and then when it makes sense to them they will naturally gravitate towards that mindset.