I remember way back when Brexit was still being run up the flagpole, people were saying they likely wouldn't acknowledge Scotland's independence if they seceded because something something Spain.The EU can't offer Scotland candidate nation status under its current rules because Scotland's still part of the UK. If that changes, well, it won't be an automatic process, but given Scotland was in the EU and its predecessors for over forty years, it shouldn't be a massive problem to rejoin.