 The cockroaches were in a kind of deep freeze coma. They were placed  where necessary for the scene and heated with a hair dryer. The crew  could only hope that they went in the right direction and no one  knew quite where they went after filming of the scene was completed.