Both parents should agree on which party will get primary custody and which will get visitation. If both parties are unable to come to an agreement a judge will rule based on the evidence presented and the best interest of the children. Both parents have the same legal rights to the children until there is a court hearing. Until that hearing, each parent has the right to be with the children. A temporary restraining order is usually issued automatically by the court when a divorce petition is filed that will forbid the parents from changing the kids’ residence or hiding them from the other parent. A temporary restraining order, however, does not award anyone custody.