Residence is governed by Section 11 (2) the Children (Scotland) Act 1995. You may well manage to agree who the child/children should reside with and who should exercise regular contact with them. There are no set rules for who should be awarded residence of the children. If you cannot agree then the courts consider what they think is in the child/children’s best interests, and grant a Residence Order in favour of, usually, one parent. This in no way diminishes the role of the non-resident parent and does not permit the resident parent to dictate the care arrangements for the children thereafter.
There are cases where, either by agreement, or by court order, parents share residence of the child/children. Again there is no set rule that applies here. Each case is different and the court considers everything from the child/children’s best interests.
If residence is disputed and the matter proceeds to court then you may end up attending court to give evidence at a Proof (essentially a hearing where all those relevant to the case and the children are given the opportunity to give evidence). After hearing from all parties the court will make a decision. That Order is considered a final order unless there is a material change in circumstances in the future.