Collisions for simple placement system I made

I made a simple placement system, and it works fine. But how can I make it so when someone places something it doesn’t go into the ground. i know that i could offset it but with different buildings with different sizes it would be very difficult. Plus placing it on elevated terrain… So ye. Ideas please.

Video reference of the placement system:

robloxapp-20220206-1214099.wmv (935.1 KB)

Make the PrimaryPart of the model an invisible part whose center is exactly at the bottom of the model. Or set up the pivot point of the model so it’s exactly at the bottom.