The goal of this script is to weld a part (the part has scripts and other things inside) to the player as soon as they join the game. The part does not weld at all where exactly did I go wrong?
game.Players.PlayerAdded:connect(function(plr)
local p = game.Workspace:FindFirstChild("Character2"):clone()
p.Parent = plr.Character
p.CFrame = CFrame.new(plr.Character.Torso.Position)
p.Anchored = false
local Y = Instance.new("Weld")
Y.Part0 = plr.Character.Torso
Y.Part1 = p
Y.Parent = Y.Part0
plr.CharacterAdded:connect(function(char)
end)

3 comments
turn off cancollide and make it massless
it already was
Make "clone()" to "Clone()". Also, "connect" is deprecated, use "Connect" instead.