I've seen TV crime dramas where a witness will try to plead the fifth and the judge won't allow it. The amendment only applies to testimony that would tend to incriminate the witness, not just make him or her look disreputable. If a witness was doing a drug deal in the same alley where a man was shot, he cannot necessarily claim his fifth amendment rights. He's not on trial for his own illegal activities; he's being asked about what he witnessed on the night of the shooting.
When I was very young, I remember watching the Watergate hearings and I thought it was strange to see all these people say the same thing over and over again: "I decline to answer that question under the rights provided to me under the fifth amendment of the Constitution". I remember one man said it at least 20 times in a row.