An employee of a gun range in Texas accidentally shot and killed a patron as he worked on a rifle Tuesday morning, police said.

The patron, Joshua Luke Cummings, 36, of Cypress, had just exited his vehicle in the parking lot of Hot Wells Gun Range when a bullet struck him in the head, KTRK in Houston reported. He was flown to Memorial Hermann-Texas Medical Center, where he died.

Harris County Sheriff’s Office officials told the news station that an employee was working on a hunting rifle inside the building when it accidentally discharged.

"The bullet went through the wall of the small range house and struck a patron who was walking through the parking lot," Harris County Senior Deputy Thomas Gilliland told the news station.

It was not immediately clear why the rifle was loaded while the employee handled it. KTKR reported that homicide investigators were looking into whether it was human error or a gun malfunction that caused the gun to fire.

Cummings' Facebook page shows that he was the father of three young children. Heartbroken friends said the Cummings children are triplets. 

YouCaring fundraiser page was established to help his wife, Kathleen, and their children. As of noon Wednesday, the page had raised nearly $10,000 of the $25,000 goal.

"Josh Cummings has always been an amazing father, faithful, hardworking husband completely devoted to his faith, family and friends," one woman wrote on Facebook. "Until we meet again, goodbye, our sweet friend."

Hot Wells officials apologized in a statement that they said would be brief because they "simply do not have the words to express the sorrow in (their) hearts."

"For 44 years, we have operated this facility accident-free, yet today, we are shaken by tragedy," the statement read.

They said that they would have no comment on the details of the accident while the investigation was ongoing.

"We understand that this accident has, and will continue to affect the lives of many," the statement read. "We ask that our community joins us in prayer for the healing of all parties involved."