The scene in which Uhura and Chekov question passersby about the location of nuclear vessels was filmed with a hidden camera. However, the people with whom Koenig and Nichols speak were extras hired off the street for that day’s shooting and, despite legends to the contrary, knew they were being filmed. In an interview with StarTrek.com, Layla Sarakalo, the extra who said, “I don’t know if I know the answer to that... I think it’s across the bay, in Alameda,” stated that after her car was impounded because she missed the warnings to move it for the filming, she approached the assistant director about appearing with the other extras, hoping to be paid enough to get her car out of impoundment. She had been told to act naturally, and so she answered them and the filmmakers kept her response in the film, though she had to be inducted into the Screen Actors Guild in order for her lines to be kept.
https://en.wikipedia.org/wiki/Star_Trek_IV:_The_Voyage_Home
Great Star Trek trivia!................