How to attach a Model to a body part and animate it (without using a Tool)

Hello guys! This is my first time posting on the forum, so let me know if i need to move this post to a different category or something.

I need some help doing something like this
As you can see, the player haves a Model attached in the back (probably with an Attachment) and moves with physics (not really interested on that) and he can move it to his hand when pressing a key or equipping it

What i am trying to do is something similar but not using a Tool, i have a Model with an attachment (an attachment that matchs with a R15 attachment on a body part), that works using a script on this post

local function AddCustomAccessory(Model, Accessory)
	Accessory.Parent = Model
	local HandleAttachment = Accessory.Handle:FindFirstChildOfClass("Attachment")
	local CharacterAttachment do
		for _, v in ipairs(Model:GetDescendants()) do
			if v.Name == HandleAttachment.Name and not v:FindFirstAncestorOfClass("Accessory") then
				CharacterAttachment = v
				break
			end
		end
	end
	
	for _, v in ipairs(Model:GetDescendants()) do
		if v.ClassName == "Weld" and v.Name == "AccessoryWeld" then
			v:Destroy()
		end
	end
	
	local AttachmentWeld = Instance.new("Motor6D")
	AttachmentWeld.Part0 = CharacterAttachment.Parent
	AttachmentWeld.Part1 = HandleAttachment.Parent
	AttachmentWeld.C0 = CharacterAttachment.CFrame
	AttachmentWeld.C1 = HandleAttachment.CFrame
	AttachmentWeld.Name = Accessory.Name
	AttachmentWeld.Parent = Accessory
end

But i need to animate that model too (just like the video) so then i can take the model from the back to the right hand and use an animation, and then move the Model to the back again.

I have searched on a lot of posts but i am really lost!

What i have tried so far is this (in combination with the other script)

	local newModel = Model:Clone()
	local weld = Instance.new("Weld", newModel)
	weld.Name = "Handle"
	weld.Part0 = newModel.Handle
	weld.Part1 = character.RightHand
	weld.C0 = newModel.Handle.WaistBackAttachment.CFrame
	weld.C1 = newModel.Handle.WaistBackAttachment.CFrame
	weld.Parent = character.RightHand
	newModel.Parent = character

But the Model attachs to the RightHand instead of being in the back and the animation looks really weird

What do i need to do? (If you need more information please let me know)

1 Like

I was able to do it by following this post

But now i just need to animate the Model when it is on the Hand, i tried creating a new instance of a Motor6D when the weld is on the RightHand but the animation wont detect it