https://www.slab.org.uk/faqs/what-is-childrens-legal-assistance/
This is how the Scottish Legal Aid Board may be able to pay for you to get help from a lawyer.
You may be able to get this kind of legal help if you are a child or an adult, such as a parent, involved in the upbringing of a child who is going to or has been to a children’s panel hearing.
It also covers court hearings that are connected to children’s hearings.