Positioning an accessory in workspace via script?

How do I drop an accessory into workspace and move the whole accessory via script? I want to have accessories in the world, that a player can pick up, then equip from inventory.

Positioning a model in worldspace is easy: SetPrimaryPartCFrame
Positioning an accessory on a humanoid is easy: AddAccessory

The problem is that an accessory has no PrimaryPart (It’s “handle” in theory, but not in code), so when I attempt to move handle in workspace, only the handle moves.

So, I’m thinking I need some sort of hacky hybrid. Put the accessory into a model and make the handle a Primary part of the model. Move it, then reparent the Accessory and finally destroy the model. It makes my head spin that this would be the solution. It’s late and I won’t have time to test this out until the morning. Surely I’m not the first person to want to see an accessory lying on the ground?

Is there a better way? Should I petition for an upgrade to Accessory to get a SetHandleCFrame command?

You can move an accessory instance via its “Handle” BasePart child instance just fine.

I must be doing it wrong. With everything welded together (confirmed working with a RigidConstraint and the Accessory system), setting the position of the Handle just moves the Handle. CFrame: same results.

	newFruit.Handle.CFrame = selection.CFrame

Every handle has moved to the tree. No other part has moved. I’m about to try the “model hack” method, but would still love some clarity!


This is my problem. Accessories are not models. They probably should be.


Hack solution does the job, but would like something better:

	local tempModel = Instance.new("Model")
	newFruit.Parent = tempModel
	tempModel.PrimaryPart = newFruit.Handle
	tempModel:SetPrimaryPartCFrame(selection.CFrame)
	newFruit.Parent = selection
	tempModel:Destroy()