Our bearded dragon got a visit to the vet after losing the ability to use both back legs. We found out Tiny was a he instead of a she. The poor thing was diagnosed with scoliosis, which meant treatment would likely not do any good. He was suffering, which was evident by the black beard. Only my touch would calm him down.
We decided to have him euthanized, so he would not have to suffer any longer than necessary.
I showed the vet a picture of the habitat, and told her about the daily care, temperatures, etc. I was doing everything right. Tiny was in the best of care. Some things are just beyond our control.