How do i get the Y scale of a model?

I’m trying to make an Inventory system and i am making a drag and drop system. When you set a model’s primary part CFrame to be the mouses position, it puts the middle of the part at the mouses position. I know how to fix this for a Part, but how for a model?

You can get the y pos of an object by doing ```object.CFrame.Y``

also i would recommend setting the Y position of the object to the players Y position

i know, but how to i get the y size of a model?

You would do part.Size.Y to get the Y size

How I would do it would be to write a for-do loop and add up all the object Y scales inside the model. Don’t know if this is what you’re looking though.

I know, but of a whole model? I know how to do this for a part already

You can do Model:GetExtentsSize.Y

1 Like

i tried this but it didnt really work
it was levitating a little bit

are the parts in the model clamped together

or maybe
local orientation, size = model:GetBoundingBox()
local sizeY = size.Y

if its floating you could just try offsetting it a bit down