If a child is taken into custody under Section 52.01 of this code, a person may not administer a polygraph examination to the child without the consent of the child's attorney or the juvenile court unless the child is transferred to criminal court for prosecution under Section 54.02 of this code.
Tex. Fam. Code § 51.151