Nicole Hazel McCoy’s friends and family were excited to throw the East Bay teen a baby shower on Friday, two weeks before she was set to give birth to the new baby.

But that joy turned to heartbreak for McCoy’s relatives as they learned the 18-year-old woman was shot dead Monday night in a San Pablo street. Doctors at a nearby hospital were unable to save the unborn child.

Investigators on Tuesday worked to solve the horrific shooting that shocked the usually quiet neighborhood, while family members, friends and classmates of the former Richmond High School student searched for answers in the seemingly senseless killings.

“She was a joyful person — full of life,” McCoy’s cousin, 20-year-old Jesse Viertel, said Tuesday afternoon near where McCoy was gunned down in the 1700 block of 17th Street.

He said he recently started spending more time with his cousin and was growing close with the lively teen, who he said was pregnant with a baby girl.

Viertel said he was at home around 7:50 p.m. when the attack happened near his house. McCoy, he said, had walked over to her baby’s soon-to-be father’s home nearby when some kind of altercation erupted.

Neighbors reported hearing multiple gunshots and a car speeding away. At the same time, police said they were inundated with 911 calls.

When officers got to the scene, they found McCoy lying in the middle of 17th Street with a gunshot wound to the upper chest, said San Pablo Police Commander Sid DeJesus.

Neighbors described the chaos as residents heard the gunfire and ran outside to see what had happened.

Maria Guillem, 49, who lives on 17th Street, said her husband and sister went outside and saw the victim lying in the street.

“Everyone was screaming and crying,” she said.

Another woman, who also lives in the neighborhood but declined to reveal her name out of fear for her safety, said she heard the gunfire and watched as police and, later, an ambulance responded to the scene.

“I feel very sad because the girl was pregnant,” the woman said Tuesday afternoon at her home.

Paramedics took McCoy to a trauma center in Alameda County where she and the baby died. Police would not say how far along the woman was in her pregnancy and were awaiting the results of an autopsy by the Contra Costa County coroner.

Investigators, meanwhile, are working to piece together the circumstances of the killing, but police have not released a possible motive and have not said if any suspects were identified or arrested.

DeJesus only said the episode was “an isolated incident” and erupted after some sort of “disturbance.”

Former classmates at Richmond High were sharing news of the killings on social media overnight Monday while discussing the tragedy.

“She was a funny person,” 16-year-old Evelyn Estrada, a junior at the high school and friend of McCoy, said. “She would say hi to everyone. She would joke around a lot.”

McCoy had announced on her Facebook page last September that she had gotten engaged to be married.

Estrada said the young woman was a good student and would often help in class as a teacher’s assistant.

“I just can’t believe it’s her,” she said. “It’s crazy. It’s crazy.”

Anyone with information about the shooting is asked to call investigators at (510) 215-3150.

Sarah Ravani and Evan Sernoffsky are San Francisco Chronicle staff writers. Email: sravani@sfchronicle.com, esernoffsky@sfchronicle.com Twitter: @SarRavani @EvanSernoffsky