Days after the deadly shooting that left 12 people dead at a bar in Thousand Oaks, California, Republican Sen. Ted Cruz of Texas is criticizing Democrats for not supporting his legislation to boost law enforcement efforts to prevent mass shootings.

"The Democrats filibuster any efforts to target the bad guys because their political agenda is instead to try to restrict the Second Amendment rights of law abiding citizens," Cruz said on "Face the Nation" Sunday. "I have right now school safety legislation that would allow money to be directed to hardening schools putting more armed police officers there, making our kids safer. The Democrats have been blocking that."

Cruz called the shooting "horrific" and said it was "yet another violent crime [where] one of the first inquiries needs to be, how could this have been preventable?"

"It appears this young man had significant issues with mental illness. That needs to be examined," Cruz said. "Many of these mass murderers, as you examine them after the fact, there are obvious red flags and failures in the system."

President Trump blamed the shooting on mental illness on Friday, calling gunman Ian Long "a very sick puppy" who had "a lot of problems."

In April, police responded to a call at the home Long shared with his mother. A mental health specialist who examined Long worried the 28-year-old Marine veteran might have post-traumatic stress disorder but concluded he couldn't be involuntarily committed for observation.

Investigators have not said whether mental illness was a factor in the shooting. Officials have said Long used a legally purchased handgun in the shooting. The Bureau of Alcohol, Tobacco, Firearms and Explosives said it was investigating how and when Long purchased the gun.

On "Face the Nation," Cruz pointed to the shooting last November in Sutherland Springs, Texas, as an example of the failure of the federal background check system.

"The shooter [in Texas], it was already illegal for him to buy a gun," Cruz said. "And the reason he was able to buy a gun is because the Air Force under the Obama administration never reported his felony conviction to the background check database system. And so, when he when he ran for a background check it came up clean."

Although California has some of the strictest gun laws in the country, Long would not have been prevented from legally owning a gun without a dishonorable discharge from the military or mental-health red flag.

Cruz also said there are "common sense steps we can and should take concerning law enforcement" and to prevent those with "serious mental illness" from being able to purchase firearms.

In 2013, Cruz and Sen. Chuck Grassley of Iowa introduced legislation that would have provided funding for school safety, mental health and prosecuting gun crimes.

The bill placed no new restrictions on gun ownership and did not expand the federal background check system. It was defeated in a filibuster led by Democrats who pushed for stricter gun control measures in the wake of the Sandy Hook massacre.