Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Welding arms makes legs and body visually disconnected. Anyone know why?

Asked by 4 years ago
Edited 4 years ago

Hello.

I'm having trouble welding arms to a HumanoidRootPart for a handcuff tool. Whenever the target's body is a non-blocky R15 model, the legs and body appear visually disconnected. Blocky R15 bodies will work fine.

A screenshot of the issue is provided here:

prnt.sc/rb6lwo

All other bodies such as R6 blocky or non-blocky will work fine. Is there any simple solution to this problem?

EDIT: I forgot to mention that this works perfectly fine when used on a non-player model.

Weld code (server-side):

local W = Instance.new("Weld")
W.Name = "DetainWeld"
W.Parent = playerTorso
W.Part0 = TargetTorso
W.Part1 = playerTorso
W.C0 = CFrame.new(-1.5,0,3)
if target:FindFirstChild("Right Arm") or target:FindFirstChild("RightUpperArm") then
local W2 = Instance.new("Weld")
W2.Name = "ArmWeld"
W2.Parent = playerTorso
W2.Part0 = TargetTorso
if target:FindFirstChild("Right Arm") then
W2.Part1 = target["Right Arm"]
else
W2.Part1 = target["RightUpperArm"]
end
W2.C1 = CFrame.new(-1,0,-0.65) * CFrame.Angles(3.5*math.pi/8,math.pi/12,0)
end
if target:FindFirstChild("Left Arm") or target:FindFirstChild("LeftUpperArm") then
local W3 = Instance.new("Weld")
W3.Name = "ArmWeld2"
W3.Parent = playerTorso
W3.Part0 = TargetTorso
if target:FindFirstChild("Left Arm") then
W3.Part1 = target["Left Arm"]
else
W3.Part1 = target["LeftUpperArm"]
end
W3.C1 = CFrame.new(1,0,-0.65) * CFrame.Angles(3.5*math.pi/8,-math.pi/10,0)
end

target = Target character

TargetTorso = Automatically detected HumanoidRootPart

playerTorso = Automatically detected HumanoidRootPart

The character is also set to Massless and PlatformStand.

Answer this question