How to check distance from jumping?

I’m trying to figure out how I can make it so if a player falls from a certain stud, something happens, how can I calculate the stud distance they fall from though?

What you can do is, when the humanoid’s state changes to falling, record their Y position on their humanoidrootpart, and when it changes back, record the y position and compare the difference

Get the magnitude position from where the player jumped, and when the player lands get the magnitude position there then do jumped magnitude position - player landed magnitude position.

https://developer.roblox.com/en-us/api-reference/event/Humanoid/FreeFalling