Cloning avatar accessories onto another

I’m fairly new to scripting, so sorry to begin if I miss understand your help, however currently I am attempting to be able to clone the character’s avatar items onto another character, I’ve seen a few methods like using the clone() function and various other functions that I do not fully understand yet. I’m just looking for help on a more clear method to be able to do so!

This is all I got so far, and don’t really know where to go next.

game.Workspace.Player.Torso:Connect(function(hit) 
	local player = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent) 
	local deb = true
	if deb == false then return end
	if player then 


	end 
end)

Again sorry for any future confusion!

function CopyHats(Char1, Char2) -- Input Characters here via your script later.
	for _,v in pairs(Char1:GetDescendants()) do
		if v:IsA("Accessory") or v:IsA("Hat") then
			v.Parent = Char2
	end
end
end
CopyHats(Char1, Char2) -- Replace Char1 and Char2 with values as input and hats will be transfered.
-- Call this later.


1 Like