How to connect Sword to All Players Hands

So I have been trying to connect a sword model to the hands of all players who join the game. I put the sword in Replicated storage and cloned the part into the character or workspace. However when I try to clone the sword into a body part, nothing happens. When I try to add a weld or Motor6D to connect the sword to the right hand like this, I parent it to the right hand. The Motor6D and weld do not appear in the right hand. It seems that I am having a problem trying to create objects within body parts as the same happened with other body parts that I tried. Here is one of the scripts that I tried.

local RS = game:GetService("ReplicatedStorage")
local TestSword = RS:WaitForChild("TestSwordAccessory")

game.Players.PlayerAdded:Connect(function(Player)
	Player.CharacterAdded:Connect(function(Character)
		local RightHand = Character:WaitForChild("RightHand")
		local TestSwordClone = TestSword:Clone()
		TestSwordClone.Name = "TestSwordClone"
		TestSwordClone.Parent = workspace
		local Motor6D = Instance.new("Motor6D")
		Motor6D.Parent = RightHand
		Motor6D.Part0 = RightHand
		Motor6D.Part1 = TestSwordClone.Handle
		Motor6D.Name = "NewGrip"
		
	end)
end)

image
Any help would be appreciated.

Try making your sword an accessory and rename sword part to Handle(make sure to unanchor it). Add attachment to handle and name it “RightGripAttachment” or “LeftGripAttachment”, then get player’s humanoid after that write humanoid(your humanoid name in local) and add function :AddAccessory(TestSwordClone), this will look like this: humanoid:AddAccessory(TestSwordClone). This should do the trick.

Why don’t you force a tool to be equipped by using the Humanoid:EquipTool(ToolInstance) method?

1 Like