I managed to solve it, in my case I opened the old 3ds xl to change the top screen, but the outside camera only worked on the fbi. So I opened it again, disconnected the ribbon cable from the camera and cleaned the contacts with isopropyl alcohol, connected it again and the camera started working again.