here i have created a script that is supposed to weld a model to the player humanoid root part
local rStorage = game:GetService("ReplicatedStorage")
local morphItem = rStorage:WaitForChild("Morph")
local maxMorphDistance = 5
morphItem.OnServerEvent:Connect(function(player, item)
local distanceFromItem = player:DistanceFromCharacter(item.Morpher.Position)
if distanceFromItem <= maxMorphDistance then
-- morphcode here
local copy = item:Clone()
copy.Parent = item.Parent
copy:SetPrimaryPartCFrame(CFrame.new(0, 50, 0))
local part = item.Morpher
local Weld = Instance.new("Weld",part)
print("done")
-- problem starts below
game:GetService("Players").PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(character)
print("a")
local torso = game.Workspace:WaitForChild(player):WaitForChild("HumanoidRootPart")
part.CFrame = torso.CFrame
Weld.Part0 = part
Weld.Part1 = torso
print("DONE".. player)
end)
end)
end
end)
im having trouble getting the player, the only thing printed to console is "done". can anyone help?

1 comment
this isnt working, i used print statements in both functions to debug and neither print statements were outputted to console