Over 30% didn't vote and over a million voted for leave. If those two things had changed they could have carried the whole thing the other way.
I completely understand that many are heartbroken and upset (I am too as pro-remain) and may feel different about the union but Scotland had a voice and could have made a difference if enough people felt differently about it.