Its irrelevant,, Scotland opted to stay with the UK and The UK opted out of the EU
It's not irrelevant at all. You're deluded if you think so.
The Scottish 'In' campaign focussed strongly on the idea that the best way for Scotland to remain in the EU was as a part of the UK. That is now null and void and a change to the nation as big as being taken out of the EU is clear justification for a second referendum.
Nicola Sturgeon and the SNP campaigned for election last year with a clear point in their manifesto being that any such change to EU membership would be seen as justification for a second referendum. The Scottish people overwhelmingly backed this manifesto in 2015.
The SNP manifesto for the Scottish Parliament election does not promise a second independence referendum within the next five year term.
However, it says Holyrood should have the right to hold another referendum if there is "clear and sustained evidence" of majority support for independence, or if there is a "significant and material" change in circumstances, such as Scotland being taken out of the EU against its will.
http://www.bbc.co.uk/news/election-2016-scotland-36181591