Positioning models with pivoting issues

local house = game.Workspace.abandonedHouse

local land = game.Workspace.Part

local position = land.CFrame * CFrame.new(0, land.Size.Y / 2, 0)

house:PivotTo(position) 

This is the script, and this is what it gives me-


How can I adjust this math so that it is positioned directly on top of the land? Or, is there a better way to do this? I’m bad at math, so help, and if there’s a complicated math solution try to keep it as simple as you can/explain it

You have to add half the Model’s Size to half the base’s Size (and Position) to get the Y value the Model should sit at.

Say the house is 2 studs high and the Part is 6 studs high.
(2/2) + (6/2) = 8/2
So the Model’s Position would be the base Part’s Position + 4 studs on the Y axis.

local position = land.CFrame * CFrame.new(0, (house.Size.Y / 2) + (land.Size.Y / 2), 0)