If there are no ideas as to how to accomplish the second part of this problem, can anyone suggest why the script above results in a crash error?

Thanks in advance