Hi! My backpacks have already been scripted, and work properly in giving the player tools, the only problem is they do not show up on an R15 character, I have the script for the torso, but it only works in r6 which is what im used to. But I would like to upgrade it to R15, so I did some experiments with using the accessory property menu and positioning it to the character, but the script ended up just breaking any suggestions?
function onTouched(hit)
if hit.Parent:findFirstChild("Humanoid") ~= nil and hit.Parent:findFirstChild("Chest") == nil then
local g = script.Parent.Parent.Chest:clone()
g.Parent = hit.Parent
local C = g:GetChildren()
for i=1, #C do
if C[i].className == "Part" or C[i].className == "UnionOperation" then
local W = Instance.new("Weld")
W.Part0 = g.Middle
W.Part1 = C[i]
W.Part1 = C[i]
local CJ = CFrame.new(g.Middle.Position)
local CJ = CFrame.new(g.Middle.Position)
local C0 = g.Middle.CFrame:inverse()*CJ
W.C0 = C0
W.C1 = C1
W.Parent = g.Middle
end
local Y = Instance.new("Weld")
Y.Part0 = hit.Parent.Torso
Y.Part1 = g.Middle
Y.C0 = CFrame.new(0, 0, 0)
Y.Parent = Y.Part0
end
local h = g:GetChildren()
for i = 1, # h do
h[i].Anchored = false
h[i].CanCollide = false
end
end
end
script.Parent.Touched:connect(onTouched)
local model = script.Parent.Parent.Parent
local backpack = model.Backpack:clone()
script.Parent.Touched:connect(function(hit)
local h = hit.Parent:findFirstChild("Humanoid")
backpack.Parent = h.Parent
backpack.Handle.Anchored = false
end)

3 comments
R15 has UpperTorso and LowerTorso while R6 has just Torso.
Use HumanoidRootPart or Upper and LowerTorso as 6zk8 said.
how would i incorporate that into the script?