Weld issue on R15 / Rthro packages?

I’m attempting to weld a bag to a characters right hand. However, with Rthro characters and R15 characters that use a different mesh besides the blocky right hand do not weld, or the bag is placed in the sky. This script works perfectly fine for R6 characters though…

Screenshots:
R6:

R15 / RTHRO:

As you can see here on the left image the player has a custom mesh hand (Boy package), and the right side the right hand is just the default block mesh.

I tried to use a Motor6D instead of a weld and even WeldConstraints, but that also didn’t work out… At this point I am stumped… How would I fix this issue where bags don’t weld to R15 / Rthro body parts using packages?

Code:

function Weld(p0, p1)
    local weld = Instance.new("Weld")
    weld.Part0 = p0
    weld.Part1 = p1
    weld.C0 = p0.CFrame:inverse()
    weld.C1 = p1.CFrame:inverse()
    weld.Parent = p0
end

local RightHand = char:FindFirstChild("RightHand") or char:FindFirstChild("Right Arm")
repeat wait() until RightHand ~= nil

local bagModel = Bags.RedBag:Clone()
bagModel.Parent = char
bagModel.Position = RightHand.Position - Vector3.new(0, (bagModel.Size.Y * 0.5) + (RightHand.Size.Y * 0.5), 0) -- Place on bottom of the hand
Weld(RightHand, bagModel);

Okay, so the issue was that when a character spawns their rig is built piece by piece. This makes me believe that when I was referencing the RightHand it was not attached to the player yet causing the bag to be positioned into a whole different area where the RightHand mesh was inserted into workspace, thus making the weld function not work.

Solution:

local bagModel = Bags.RedBag:Clone()
bagModel.Parent = char
bagModel.Position = char.RightHand.Position - Vector3.new(0, bagModel.Size.Y * 0.25, 0) -- Place in the middle of hand
Weld(char.RightHand, bagModel)
2 Likes