As noted, this is very very bad, especially if it is the star that I am thinking of...
They need mature tanks with the parameters noted by Richard above. Anything else is a very bad and stressful situation for them. Depending on the species, it may not survive. The stress can also be due to acclimation to another system, even one with good conditions. If the acclimation is too quick, it will go into shock, and lose legs like this. Ultimately, it may lose them all the way to the disk, meaning the animal will have trouble moving and feeding. Then the disk may begin to disintegrate too
In short, this signs are not good. You can try moving it to a tank with pristine water conditions, especially good specific gravity, pH and alk, but the acclimation must be slow...perhaps even 4 hours using a drip acclimation. Throwing it in another tank will probably speed up its death...however, it is unlikely to survive in the current situation either.
If water conditions improve, it may regrow the arms, but if the damage is too much, it will not survive. If it does survive, it will need to be fed, and the water quality must be kept pristine. However, watch for any changes during water changes...they can go into shock easily and are not recommended for younger tanks.