Okay, I see your point about my.z = 0. But what about my.z = NULL?

When the player stands on a ledge, my.z = 2333.827 . When the player walks off the ledge, and the player is falling in mid-air, the value of my.z disappears to nothing, as in no value visible. I would think that the my.z would still remain visible, and show it counting down rapidly, but it does not.

When the player lands on the ground, a value for my.z suddenly appears as 49.267. Yes, I would like to take 2333.827 - 49.267 = 2284.56, and judging by 2284.56, give the player damage to its health, but I am trying to make this work for any two values that my.z ends up equaling, after the player falls.

And yes, to be honest, I believe I got this code from someone else a long time ago. I thought I understood enough of it to be effective for me, but I have unexpectedly run into this issue. When I solve this issue, it will allow me to understand it better.