How would I make a dragging system like in Roblox Studio?

There is a great guide about how to make a placement system on the dev forum: Creating A Furniture Placement System

Even if you want to make a custom system this should be very helpful in clarifying some issues you are having.