Hello everyone, I have noticed that when I use this ragdoll script:
local function BreakBones(Character)
for index, joint in pairs(Character:GetDescendants()) do
if joint:IsA("Motor6D") and joint.Name ~= 'RightGrip' then
local socket = Instance.new("BallSocketConstraint")
local a1 = Instance.new("Attachment")
local a2 = Instance.new("Attachment")
a1.Parent = joint.Part0
a2.Parent = joint.Part1
socket.Parent = joint.Parent
socket.Attachment0 = a1
socket.Attachment1 = a2
a1.CFrame = joint.C0
a2.CFrame = joint.C1
socket.LimitsEnabled = true
socket.TwistLimitsEnabled = true
joint:Destroy()
end
end
Character.Humanoid.PlatformStand = true
Character.Humanoid.WalkSpeed = 0
task.delay(2, function()
for index, socket in pairs(Character:GetDescendants()) do
if socket:IsA("BallSocketConstraint") then
local attachment0 = socket.Attachment0
local attachment1 = socket.Attachment1
local part0 = attachment0.Parent
local part1 = attachment1.Parent
local motor = Instance.new("Motor6D")
motor.Part0 = part0
motor.Part1 = part1
motor.C0 = attachment0.CFrame
motor.C1 = attachment1.CFrame
motor.Parent = part0
socket:Destroy()
attachment0:Destroy()
attachment1:Destroy()
end
end
Character.Humanoid.PlatformStand = false
Character.Humanoid.WalkSpeed = 16
end)
end
the handle of a tool flings out of the player’s hand and doesn’t come back and eventually tool is deleted from player’s inventory even though its supposed to not delete the RightGrip weld.
I made it only run if joint.Parent.Name ~= ‘RightHand’ but it still has the same glitch:
local function BreakBones(Character)
for index, joint in pairs(Character:GetDescendants()) do
if joint:IsA("Motor6D") and joint.Parent ~= 'RightHand' then
local socket = Instance.new("BallSocketConstraint")
local a1 = Instance.new("Attachment")
local a2 = Instance.new("Attachment")
a1.Parent = joint.Part0
a2.Parent = joint.Part1
socket.Parent = joint.Parent
socket.Attachment0 = a1
socket.Attachment1 = a2
a1.CFrame = joint.C0
a2.CFrame = joint.C1
socket.LimitsEnabled = true
socket.TwistLimitsEnabled = true
joint:Destroy()
end
end
Character.Humanoid.PlatformStand = true
Character.Humanoid.WalkSpeed = 0
task.delay(2, function()
for index, socket in pairs(Character:GetDescendants()) do
if socket:IsA("BallSocketConstraint") then
local attachment0 = socket.Attachment0
local attachment1 = socket.Attachment1
local part0 = attachment0.Parent
local part1 = attachment1.Parent
local motor = Instance.new("Motor6D")
motor.Part0 = part0
motor.Part1 = part1
motor.C0 = attachment0.CFrame
motor.C1 = attachment1.CFrame
motor.Parent = part0
socket:Destroy()
attachment0:Destroy()
attachment1:Destroy()
end
end
Character.Humanoid.PlatformStand = false
Character.Humanoid.WalkSpeed = 16
end)
end
local function BreakBones(Character)
for index, joint in pairs(Character:GetDescendants()) do
if joint:IsA("Motor6D") then
if joint.Name == "RightHand" or joint.Name == "RightGripAttachment" then continue end
local socket = Instance.new("BallSocketConstraint")
local a1 = Instance.new("Attachment")
local a2 = Instance.new("Attachment")
a1.Parent = joint.Part0
a2.Parent = joint.Part1
socket.Parent = joint.Parent
socket.Attachment0 = a1
socket.Attachment1 = a2
a1.CFrame = joint.C0
a2.CFrame = joint.C1
socket.LimitsEnabled = true
socket.TwistLimitsEnabled = true
joint:Destroy()
end
end
Character.Humanoid.PlatformStand = true
Character.Humanoid.WalkSpeed = 0
task.delay(2, function()
for index, socket in pairs(Character:GetDescendants()) do
if socket:IsA("BallSocketConstraint") then
local attachment0 = socket.Attachment0
local attachment1 = socket.Attachment1
local part0 = attachment0.Parent
local part1 = attachment1.Parent
local motor = Instance.new("Motor6D")
motor.Part0 = part0
motor.Part1 = part1
motor.C0 = attachment0.CFrame
motor.C1 = attachment1.CFrame
motor.Parent = part0
socket:Destroy()
attachment0:Destroy()
attachment1:Destroy()
end
end
Character.Humanoid.PlatformStand = false
Character.Humanoid.WalkSpeed = 16
end)
end
What’s probably happening is that when you destroy the RootJoint, it’s detaching the HumanoidRootPart from the rest of the character, which can mess with the physics and basically yeet the tool outta the player’s hand.
Instead of skipping based on joint.Name == "RightHand" or "RightGripAttachment", you might wanna skip "RootJoint" too — like, just add that to your conditional so it doesn’t get destroyed. That joint is kinda vital for keeping everything grounded (literally), and removing it can send the whole character into chaos, including the stuff welded to them.
So just tweak your if to something like:
if joint:IsA("Motor6D") and not (joint.Name == "RightGrip" or joint.Name == "RootJoint") then
Or even better, build a list of joints to ignore so it’s easier to manage:
local ignoreJoints = {
RightGrip = true,
RootJoint = true,
-- add any others you find important
}
if joint:IsA("Motor6D") and not ignoreJoints[joint.Name] then