A Collin County judge decided on the punishment for Brenden Bridges and Adam Staup on Friday.
The teens pleaded guilty to killing 17-year-old Ivan Mejia last year.
During the sentencing phase of the trial, prosecutors showed the judge how the teens planned the murder for days.
They tricked Mejia into meeting them near Wylie High School and then attacked him.
Defense attorneys spent the week calling character witnesses. Many testified that Bridges and Staup had no previous history of violence.
"This has affected the families of both these boys. They're struggling with the loss that's going to happen when these boys go off to prison. But we are mindful of the fact that these are young boys going off to an adult prison. It's not going to be an easy task," said Edwin King, Bridges' attorney.
Both boys were 16 years old when they killed Mejia.
His family said they are disappointed with the sentence. They said 30 years sends a message to their son's murders that they are not accountable.