When an alien ship crosses the Enterprise's path, its strong scanners cause all of the crew members to completely lose their memories