A temporary road closure is being trialled outside a school to make it safer for children at drop-off and pick-up times.