RICHMOND, Va. — Al Stenger, who is undecided in the Virginia governor’s race next month, is the sort of voter the Democratic candidate badly wants to reach.

Mr. Stenger, a dentist who leans Republican, was sympathetic in the past to the National Rifle Association message that “the only thing that stops a bad guy with a gun is a good guy with a gun.”

But after the horrific shooting in Las Vegas, Mr. Stenger for the first time is open to outlawing assault rifles like those the Las Vegas gunman used to devastating effect. It is a position that Ralph Northam, the Democratic candidate, spoke out for emotionally after the shooting, and which Ed Gillespie, the Republican, opposes.

“This one struck home to me,” Mr. Stenger said. “We can’t have this sort of thing in our country. It’s going to undermine our ability to be free people. You can’t go to a concert in fear of some guy opening fire.”