How the Roblox draggers work?

So I’m trying to create a dragger system like the Roblox one, but I don’t have any idea of how they calculate the position for doing this

I tried with this but it doesn’t work as expected

local offset = * info.rayNormal.Unit) / 2)
local _, x, _ = CFrame.lookAt(info.rayHit, info.rayHit + info.rayNormal):ToOrientation()
object.CFrame = * CFrame.Angles(0, x, 0) * CFrame.Angles(0, math.rad(90), 0) * offset
1 Like

Are you referring to the legacy drag tool which was available in Build-mode? It uses the mouse object and just positions the part according to the value of “mouse.Hit”, while target filtering the part instance being moved.

I provided a visual example of which draggers(The Studio building ones)

You should probably use @Forummer’s idea of mouse.Hit

I already know that, but I don’t know how to make that CFrame(mouse.Hit) relative to the target angle like the Roblox dragger does

Lemme open up a test place

1 Like
mouse.Hit * CFrame.Angles(math.rad(mouse.Target.Orientation.X), math.rad(mouse.Target.Orientation.Y), math.rad(mouse.Target.Orientation.Z))
1 Like

You can inspect the source code yourself. These are Lua draggers and they’re implemented as built-in plugins which you can fetch from your installation of Studio.

%appdata%\..\Local\Roblox → Find the latest Studio version folder → Check BuiltInPlugins


There isn’t any folder called “BuildInPlugins”

Edit: I found it, thanks!