Could be one of many things, the very basics being a sudden drop in temperature, and or low battery condition,
From there you would be looking at the common electrical issues associated with the 350Z roof operation.
There is a mechanical operation to get the roof closed in an "emergency" which you will find in the handbook.