I think we’re getting our lefts and rights confused. To move to the right.
The default x would be the starting position, no extra math. If you want it go right then add the final move amount and then subtract the formula from it. Replace 300 with whatever # you need.
Object defaultX equals ObjectX.X()
Set x of object = object.Variable(defaultX) + 300 - (300 x (object.health::health() / object.health::maxHealth() ) )
I added 300 minus and put the rest in parentheses just to be clear and safe. The parentheses in this case might not be needed but it makes it easier to read.