The colony of carpenter ants flown aboard the space shuttle Challenger last month apparently died from dehydration, though students and teachers examining the first 30 bodies yesterday had no clues to when the ants died.

"They could have died before they left Earth or after they returned to Earth and sat out in the California desert for eight days," said Nicholas Timpanelli, a Camden, N.J., science teacher. "They also could have died in space but, to be honest with you right now, we don't have a clue when they died."

Students at Camden and Woodrow Wilson high schools who devised the experiment say they suspect that lack of water was the cause of death. Not only did the bodies of the 30 ants recovered yesterday appear dehydrated, so did the sphagnum moss where the colony of 150 carpenter ants and their queen lived, nested and moved around.

Timpanelli said that the moss removed with the 30 bodies yesterday appeared bone dry, as if it had not received any moisture for days or even weeks.

"Ants who die for a reason other than dehydration curl themselves up in death, and these ants were not curled up," Timpanelli said. "Also, their thoraxes were flattened, which also suggests dehydration."

Curiously, the plastic-and-wood housing where the ant colony lived inside a metal canister in Challenger's cargo bay still held one full tube of water from which the ants could drink. Two other water tubes were empty, suggesting that the ants were drinking at least while they were on the ground awaiting liftoff and even after Challenger took them into space.

"We don't have any clue as to why we still have a full tube of water and we have 30 dehydrated ants," Timpanelli said.

"What we have on our hands is the equivalent of an ant detective story."

Timpanelli and his 15 students watched about 20 minutes of videotape yesterday which had been taken inside one quadrant of the colony during liftoff and the first 10 minutes the ants were weightless. The videotape recording showed no signs of motion inside the colony.

"This could mean simply that the ants hid inside the moss when the camera's lights came on," Timpanelli said. "It could also mean the ants were already dead. After all, they had been in the payload bay of Challenger since April 24, almost two months before liftoff."

The students, who had worked on the experiment since 1981 with a $10,000 grant from RCA Corp., spent most of yesterday being lectured by two biologists from Philadelphia's Temple University on how to look and what to look for in the next two weeks when they begin to perform autopsies.

The autopsies will be done at Temple, where the students, many of whom have already been graduated and are attending college, will have instruments and professional advice.

One of the first things they will do is perform a protein anlaysis of the dead ants. This should pinpoint when the ants died. They will also perform a mass spectrographic analysis of the ants' remains. This is expected to confirm cause of death.

The home will be analyzed to determine when the moss became dehydrated, which will be another clue to time of death. Still films taken of another quadrant of the ant colony will also be examined next week, providing more evidence.

However long it takes, Timpanelli said, it will all be a great learning experience for the students. Said the Woodrow Wilson High School instructor: "All the kids who worked on this experiment were there in their old high school lab today. I've never seen such enthusiasm for anything before."