How should I go about making a draggable part?

I’m making a game in which the player will be able to pick up cubes, but my only issue is that I’m not sure how to actually make a draggable part that the player can pick up and rotate. Does anyone know how?

Well, I suppose you could use a clickdetector for this. Once the player clicks on the part, you will just get the player’s mouse position change the part’s position in the Mouse.Move event by setting it as the mouse’s position. Then once the player drops it, you can disconnect that event.

local ClickDetector = workspace.Part.ClickDetector

ClickDetector.MouseClick:Connect(function(playerWhoClicked)
    local Mouse = playerWhoClicked:GetMouse()
    Mouse.Move:Connect(function()
        -- set the part's position to cursor
        ClickDetector.Parent.Position = Mouse.Hit.Position
    end)
end)

Of course if you want smooth movement for that part, you can use TweenService to tween the part.

For rotation, you use UserInputService to detect if the player is holding down the R key or not (or whatever key the part can be rotated with).

I suggest also implementing a remote event in your project because the player will only be able to see the part’s position being changed.