How to get Y axis of part Size in workspace

Hello! How to get Y coordinate from part size depending on position in the world? When part rotation changes, its size coordinate, which is responsible for its height in the world, changes.

I tried using :VectorToWorldSpace() for this, but when the part is rotated, it works very badly.

How can I find out the height of a part at any point on the part, as in this picture?
image

Could you maybe explain what exactly you mean with this? If you rotate a part, the size of that part doesn’t change, neither do the position coordinates. What exactly changes in your part?

If the part is rotated so its top face was now pointing to the left, its height in world space would be different unless its Y and X size values were the same.

you can do a raycast on the top of the part, and then do a raycast on the bottom of the part, and then subtract the positions of them and get the magnitude of that thing to get the size of the part, although that would be kind of annoying to do.
something like this:

local raycast_top = workspace:Raycast(part.Position + (justy * 1025),(justy * -1025),RCP) 
local raycast_bottom = workspace:Raycast(part.Position - (justy * 1025),(justy * 1025),RCP)
if raycast_top and raycast_bottom and raycast_top.Instance == raycast_bottom.Instance then
	return (raycast_top.Position - raycast_bottom.Position).Magnitude -- do something with this
end