I’m building a carry body system for my Hitman-style game. I don’t know why, but I do know that it is when I weld the two characters together that my character suddenly drops dead for apparently no reason. Here’s my current code:
Weld = Instance.new("WeldConstraint", player.Character.HumanoidRootPart)
Weld.Name = "CarryWeld"
target.Status.BeingCarried.Value = true
main.Flags[player.Name].CarryingBody.Value = true
local targetHumanoidRootPart = target.HumanoidRootPart
local humanoidRootPart = player.Character.HumanoidRootPart
for _,v in pairs(target:GetDescendants()) do
if v:IsA("BasePart") then
v.Massless = true
v.CanCollide = false
end
end
targetHumanoidRootPart.CFrame = humanoidRootPart.CFrame * CFrame.new(-1.5, 1.2, 0) * CFrame.Angles(math.rad(270), 0, 0)
Weld.Part0 = humanoidRootPart
Weld.Part1 = targetHumanoidRootPart
target.Humanoid.PlatformStand = true;
If anyone has a solution or a fix, please tell me. Thank you!