Dylan Patton of the popular soap opera “Days of Our Lives” was charged Thursday with selling cocaine from his parents’ California home.

Patton, 20, was arrested at his family’s Agoura Hills home by Los Angeles police on Tuesday. An undercover cop told TMZ he went into the home where Patton was selling the cocaine, “scored the drug and then got a search warrant.” The New York Daily News reported his parents were home when he was arrested on Tuesday.

The Los Angeles Times reported deputies seized the cocaine from the home, which was within 1,000 feet of Sumac Elementary School. California Health and Safety Code 11352 states that if a cocaine-based substance is sold in near proximity of a school, the penalties are much more severe.

The soap star was charged with a felony possession of cocaine with the intent to sell a controlled substance. He was scheduled to be arraigned on Thursday.

Patton’s bail was set at $30,000 and faces up to nine years in state prison.

Patton is best known for playing Will Horton on the NBC soap opera “Days of Our Lives” in 2010. He has also appeared in television shows like “Cold Case” and “That’s So Raven.”