How may i copy & attach this Part to a Humanoid on a part touch/player joining?

Hello! Lately i wanted to make a Katana weapon, But i’ve stumbled upon a problem.

How can i get the KatanaAttachPart.Weld attached to the Torso of a character if touched an part nor if joined?

The children of the Parent look like this:
image

And the script looks like this:

local debounce = false
local KatanaClone = script.Parent.Paren

script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild(“Humanoid”) then
debounce = true

	KatanaClone.KatanaAttachPart.Weld.Part1 = hit.Parent.HumanoidRootPart
	hit.Parent.Katana.KatanaAttachPart.Anchored = false
	
	wait(5)
	debounce = false
end

end)

All Help will be appriciated, Thank you!

make a script and put it in ServerScriptService Parent the katana under the script

local Players = game:GetService("Players")
local Katana = script:WaitForChild("Katana")

Players.PlayerAdded:Connect(function(Player)
	Player.CharacterAdded:Connect(function(Character)
		local RootPart = Character:WaitForChild("HumanoidRootPart")
		if RootPart then
			local Clone = Katana:Clone()
			local Weld = Clone.KatanaAttachPart.TorsoWeld

			Weld.Part0 = RootPart
			Weld.Part1 = Weld.Parent

			Weld.C0 = CFrame.new(0, -RootPart.Size.Y/2, RootPart.Size.Z/2)

			Weld.Part1.Anchored = false
			Clone.Parent = Character
		end
	end)
end)

It Worked, Thank you so much!

[additional characters]