After hearing the evidence, the court shall make and note in the minutes of the proceeding a finding of whether or not the minor is guilty. If it finds that the minor is not guilty, the court shall order the petition dismissed and the minor discharged from any detention or restriction previously ordered in such proceeding. If the court finds that the minor is guilty, the court shall then set a time for a sentencing hearing to be conducted under Section 5-705 at which hearing the court shall determine whether it is in the best interests of the minor and the public that the minor be made a ward of the court. To assist the court in making this and other determinations at the sentencing hearing, the court may order that an investigation be conducted and a social investigation report be prepared.
705 ILCS 405/5-620