The referendum in 1979 was over devolution, not independence. There was a narrow majority in favour, but an additional condition was attached that more than 40% of the electorate must have voted "yes", so the result was discarded.
A subsequent referendum on devolution in 1997 yielded a "yes" majority, hence Scotland now having its own parliament.
A subsequent referendum on devolution in 1997 yielded a "yes" majority, hence Scotland now having its own parliament.