Certified GKH Gardening Expert
While they can be grown indoors, they need to be given adequate lighting and water. It sounds as if yours may have been given too much or too little water. Check the soil to ensure the plant is not too wet, which can lead to rot. This article will help with that: https://www.gardeningknowhow.com/plant-problems/disease/treating-root-rot-gardening-tips-for-housplants.htm
If it's too dry, you will need to give it a good watering, allowing it to drain out from the pot. Only water when the soil is somewhat dry.