Need help with scripting dragging for a building tool

On this topic, everything is explained. The system is 100% custom, and does everything you wanted (except resizing).

He explains placement, rotation, snapping to a surface, grid placement, saving the position in the datastore, and some other things.

You can test the code in game here.