Runtime error (IndexOutOfRangeException): index out of range: 0 Traceback: line 3, in script

Actually I am following a tutorial and I am applying the same steps.

  1. in the aggregate command the goal is to rotate the object based on certain plane and set point, when I wrote “return” everything is okay as shown in pic 1, but when I wrote a=… to see the results, an error appear as shown in pic 2

  2. in the recursiveAggregation command the goal is to copy each time the object and put it in different orientation consecutively to have many copied object

Thank you
Fatima