within the motor, more specifically.
the gear has likely stripped. there is a replacement gear in the works that won't melt/strip, but it isn't quite ready yet.
new motors are expensive, though. shut your sunroof while you still can, and leave it that way until you can afford an entire motor assembly or the replacement gear is available.
Ray