The following rules apply
British citizens resident in Scotland. Commonwealth citizens resident in Scotland who have leave to remain in the UK or do not require such leave. Citizens of the Republic of Ireland and other EU countries resident in Scotland. Members of the House of Lords resident in Scotland. Service personnel serving in the UK or overseas with the armed forces who are registered to vote in Scotland. Crown personnel serving outside the UK with HM Government who are registered to vote in Scotland.
Voting minimum age 16. I find it quite bizarre that my Scottish friends living in England have no vote, but any Commonwealth or EU persons living in Scotland do.