I am trying to weld a backpack to the characters upper torso so it can move along with the rest of the body. The only problem is every time I try to do that, the backpack spawns unwelded, about 30 studs away from my characters back. When I weld it to HumanoidRootPart, it welds, and it is in the middle of my character, but does not follow animations.
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(char)
local torso = char:WaitForChild("HumanoidRootPart")
local uppertorso = char:WaitForChild("UpperTorso")--You can change this to another body part
game:WaitForChild("ReplicatedStorage")
local backpack = game.ReplicatedStorage.backpack:Clone()
backpack.Parent = char
local weld = Instance.new("Motor6D", uppertorso) --Could also use a Motor6D, or likewise
weld.C0 = CFrame.new() --Both C0 and C1 are, by default, set to a blank CFrame
weld.C1 = CFrame.new()
weld.Enabled = true
weld.Part0 = backpack.PrimaryPart
weld.Part1 = uppertorso
player:WaitForChild("leaderstats")
backpack.textpart.SurfaceGui.TextLabel.Text = "DNA: "..tostring(player.leaderstats.DNA.Value)
end)
end)

2 comments
Is your character r6 or r15?
r15