Can everyone Help me?

you loaded 17 images. set numFrames to 17 and it should work.

Arrays start at 0 array[10] only accepts 0,1,2,3,4,5,6,7,8,9 (10 inputs). If you enter array[10] it will return out of bounds