Are you trying to return the integer array score?
   ....
        for (int i = 0; i < score.Length; i++)
        {
            total += score[i];
        }
        return score;
    }
So you can capture this array when you call it like so
int[] scores = GetValues();
5
solved “Not all code paths return a value”