For weeks, Hillary Clinton and her campaign have struggled to find a line of attack that could work against Donald J. Trump, one of the most atypical and nonideological candidates the Republicans have prepared to nominate for president.

On Tuesday, she appeared to have found one. Mrs. Clinton seized on a comment that Mr. Trump made when he was running Trump University in 2006, in which he appeared to root for a housing bubble collapse because, he said, people like him could make money off it.

In a style similar to Twitter attacks against Mr. Trump by Senator Elizabeth Warren of Massachusetts, Mrs. Clinton’s team repeatedly posted that her main rival was ultimately looking out only for himself.

“In Trump’s world, a ‘good result’ means Trump gets his and working families get hurt. We’re better than that,” Mrs. Clinton’s aides wrote in one post on Twitter.