The first minister said his predecessor had "changed the lives of people in Scotland for the better".