The large majority of millennial parents plan to cover at least part of their children’s higher education, despite still owing thousands of dollars in student debt themselves.

The reason, said TD Ameritrade senior manager of retirement Dara Luber: The lingering student debt is a “pain point” for millennial parents, who don’t want to see their children go through the same circumstance.

A TD Ameritrade survey took stock of the saving trends of millennial parents ages 19 to 37 and grandparents from 50 to 70. It found millennial parents still owed an average of $9,180 in student debt, while grandparents still owed a little over $1,000.

However, both generations are still saving for their kids and grandkids. Millennials, on average, are saving $310 per month for their children’s education, while grandparents stow away a healthy $205 monthly for their grandchildren to go to school.

“It’s very encouraging to see that parents are saving for college,” Luber said. “They see how important it is to starting putting away now.”

In fact, the top saving priorities for millennial parents were their children’s education and building up an emergency fund. Saving for their children’s education beat out savings for retirement, a down payment for a home and health and medical emergencies. Grandparents were most likely to choose retirement as their top saving priority.

“The fact grandparents are contributing is really helping,” Luber said. “An education is something that they can always have. For grandparents, that’s a way they can really leave their legacy.”

Only about a fifth of caucasian parents said they plan to pay all of their child’s education expenses. Hispanic and Asian parents were twice as likely to expect to pay for their children’s education in full than white parents.

Millennial parents are willing to…