Basic Mel Script Help

I am trying to get this script to work and am new to MEL. I am trying to get a foot control box to move an upperbody node only when the foot box translates in the Z axis. Here is what I have so far and I get a syntax error. If anyone can look at this and tell me what I am doing wrong and help that would be great Thanks
Here is my script so far

If (Ankle.translateZ >= 0)
Upper_Body.translateZ = Ankle.translateZ;
else (Ankle.translateZ < 0)
Upper_Body.translateZ = Upper_Body.translateZ;

if(getAttr Ankle.translateZ >= 0)
setAttr "Upper_Body.translateZ" getAttr Ankle.translateZ;

you need to use "else if" instead of "else" if you wanna have a test contition, but since your else statement only assigns a value to itself you might as well skip that part all together

Thank you so much! That works great How would I lmit that only to the positive translation though and not the negative?

float $a = getAttr Ankle.translateZ;
float $b = getAttr Upper\_Body.translateZ;
if($a >= 0 && $a > $
setAttr "Upper_Body.translateZ" $a;

something like that should work

Thank you again! =0)