How to weld sword handle to player's right hand?

I’m trying to get a “KatanaModel” from server storage to spawn on the players right hand when it spawns in, but my script is not working despite me having researched on how to do this for nearly an hour now not sure what I’m doing wrong hopefully someone can help.

my script currently:

game.Players.PlayerAdded:connect(function(plr)

		plr.CharacterAdded:connect(function(char)
		if plr.Parent == game.Workspace.Attackable then
		local partClone = game:GetService("ServerStorage").KatanaModel:Clone()
		partClone.Parent = char.HumanoidRootPart

		local weld = Instance.new("Weld", char.HumanoidRootPart)
		weld.Part0 = char.HumanoidRootPart
		weld.Part1 = partClone.Handle
		weld.C0 = CFrame.new(0,0.6,0) 
		weld.C0 = CFrame.new(0,0,0) * CFrame.Angles(90, (90), 0)
		end
	end)

end)

The player is already automatically put into the “Attackable” folder you see in the script

as you can see the katana model “model” is nowhere to be found when I spawn

1 Like

On the variable where it says part Clone, remove the clone() at the end, do instead

Local ServerStorage = game:GetService(“ServerStorage”)

Local Part = ServerStorage.KatanaModel

– And then the welding, when you equip the sword make sure to do bluhbluh.KatanaModel:Clone.Parent = char or whatever u want to parent it to

1 Like

changing both C0? why not C1?–

also @Ezmoreth he is doing it right

The error to your script is that it parents the first model that wasn’t cloned (The original) with no welds, therefore we instead created the Welds before the Clone and then clone it with the Parent when we equip the model.

– Client Script –

Local UIS = game:GetService(“UserInputService”)

UIS.InputBegan:Connect(function(input, IsTyping)
If IsTyping then return end
If input.KeyCode == Enum.KeyCode.WhateverKey then
Remote:FireServer()

end)

– ServerScript –

Remote.OnServerEvent:Connect(function(plr)
Local char = plr.Character or plr.CharacterAdded()
Local Katana = game.ServerStorage.KatanaModel
Katana:Clone().Parent = Char
end)

Yeah thats wrong, you can find models by doing that or anything in that matter.