Ok..
I immediately notice 16 clones of the ghost object, which I don't understand..
They are probably all in the ghosts family, but wouldn't it be much easier just to use copies instead of clones?
Than you could pick random ghost instance instead of random family instance..
I would set the animation to "e"&ghost.instancevariable and just repeat picking a random instance 5 times and changing the variable to ghost.instancevariable+1 and setting the animation to "e"&ghost.instancevariable..
Maybe adding a boolean to make sure instances aren't picked twice during the repeat..