Both usually. Poor gutloading/supplementation and/or lack of UVB leads to metabolic bone disease - basically the bones get soft because there isn't enough calcium absorbed from the diet to support bodily functions so the body pulls calcium out of the bones until there isn't really any left. On x-rays the bones may not even show up in the end stages because there is so little calcium left. MBD affected animals (doesn't just happen to reptiles) can have bones break just walking because they are so weak. MBD eventually kills them but soft bones are some of the signs of progression getting severe.