How to make drag to move for build mode like in adopt me

i only need to know how the hold to move button works. i already know a little about raycasting and stuff like that. i also already have a grid system and rotate buttons and everything. thank you so much for any help :love_you_gesture: