Knife sheath not welding to character when wearing mesh package?

Hello, this is an odd one. But essentially, I made a knife sheath.

How it works is whenever a player’s character is added or resets, a part in ReplicatedStorage called “Sheath” is cloned, and then parented to the player’s character. The part is welded to the lower torso of the player.
The mesh’s offset is set to the appropriate place where the sheath should be, and the part itself is located in the middle of the character’s waist, albeit invisible and noncollideable. This is the script for it:

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(char)
		local sheath = game.ReplicatedStorage.Sheath:Clone()
		sheath.Parent = char
		local leg = char:FindFirstChild("LowerTorso")
		sheath.Position = leg.Position
		sheath.WeldConstraint.Part1 = leg
		sheath.Mesh.Offset = Vector3.new(1,0.5,-0.5)
		sheath.Mesh.Scale = Vector3.new(0.8,0.8,0.8)
	end)
end)

It works fine… for 1.0 characters. The moment you put on a package though, the weld doesn’t seem to work for any character with a package. I checked and the name of the LowerTorso is obviously the same, regardless of your package. The part’s CFrame is set to the lowerTorso, but then it just falls into the void.

Anyone know what’s going on?

1 Like

Packages are loaded using some external system (copy a packaged character from play testing on studio, you can see little items that represent the package). If I am not mistaken, these things manipulate the part and may be breaking your weld.

1 Like

I think this may be the case, though I would question @Yolimod when you mean

I don’t clearly understand it.

Do you mean it is out of position below the character, or it falls into where parts will be destroyed?

1 Like

Would there be some solution to wait for the package to be loaded and then weld it? That’s the only solution I can think of it’s that’s the issue.

I suppose, perhaps having a :WaitForChild() on the package?

1 Like

I mean the weld doesn’t work. The part itself isn’t collide-able so it is set to the correct CFrame, but then falls into the kill plane and despawns, because the weld ceases to work with packages.

The main issue is that with R15, the meshes aren’t children of the body parts like R6, the mesh parts are simply spawned in with a set mesh.

That would warn in the output that it could yield infinitely for a few seconds I think, so use:

repeat wait() until char:FindFirstChild("LowerTorso")
1 Like

Perhaps try welding the sheath to the HumanoidRootPart temporarily, and wait?

1 Like

Perhaps, don’t animations not affect the HumanoidRootPart though?

Atta boy. That seems to work great! I think the issue was the latency of having to retrieve the meshes from a database, or some other hackerman explanation.

Thank you!

No problem, I hope you have success in your current endeavors!

1 Like

Thanks! And same to you and your projects.