So i was making this toggleable R6 ragdoll script and then i stubbled across this problem where the limbs were clipping through the baseplate and pretty much didn't collide with anything, is there a way to fix this?
Script -
local Character = script.Parent
local Ragdoll = Character:WaitForChild("Ragdoll")
script.Parent.Humanoid.BreakJointsOnDeath = false
Ragdoll.Changed:Connect(function(newValue)
if newValue == true then
script.Parent.Humanoid.PlatformStand = true
script.Parent.Humanoid.AutoRotate = false
for i, v in pairs(script.Parent.Torso:GetChildren()) do
if v:IsA("Motor6D") then
v.Part0 = nil
end
end
local HA1 = Instance.new("Attachment",script.Parent.Head)
local HA2 = Instance.new("Attachment",script.Parent.Torso)
local RAA1 = Instance.new("Attachment",script.Parent["Right Arm"])
local RAA2 = Instance.new("Attachment",script.Parent.Torso)
local LAA1 = Instance.new("Attachment",script.Parent["Left Arm"])
local LAA2 = Instance.new("Attachment",script.Parent.Torso)
local RLA1 = Instance.new("Attachment",script.Parent["Right Leg"])
local RLA2 = Instance.new("Attachment",script.Parent.Torso)
local LLA1 = Instance.new("Attachment",script.Parent["Left Leg"])
local LLA2 = Instance.new("Attachment",script.Parent.Torso)
local HC = Instance.new("BallSocketConstraint",script.Parent.Torso)
local RAC = Instance.new("BallSocketConstraint",script.Parent.Torso)
local LAC = Instance.new("BallSocketConstraint",script.Parent.Torso)
local RLC = Instance.new("BallSocketConstraint",script.Parent.Torso)
local LLC = Instance.new("BallSocketConstraint",script.Parent.Torso)
HA1.Position = Vector3.new(0,-0.5,0)
RAA1.Position = Vector3.new(-0.5,1,0)
LAA1.Position = Vector3.new(0.5,1,0)
RLA1.Position = Vector3.new(0,1,0)
LLA1.Position = Vector3.new(0,1,0)
HA2.Position = Vector3.new(0,1,0)
RAA2.Position = Vector3.new(1,1,0)
LAA2.Position = Vector3.new(-1,1,0)
RLA2.Position = Vector3.new(0.5,-1,0)
LLA2.Position = Vector3.new(-0.5,-1,0)
HC.Attachment0 = HA2
HC.Attachment1 = HA1
RAC.Attachment0 = RAA2
RAC.Attachment1 = RAA1
LAC.Attachment0 = LAA2
LAC.Attachment1 = LAA1
RLC.Attachment0 = RLA2
RLC.Attachment1 = RLA1
LLC.Attachment0 = LLA2
LLC.Attachment1 = LLA1
elseif newValue == false then
script.Parent.Humanoid.PlatformStand = false
script.Parent.Humanoid.AutoRotate = true
for i, v in pairs(script.Parent.Torso:GetChildren()) do
if v:IsA("Attachment") then
if v.Name == "Attachment" then
v:Destroy()
end
elseif v:IsA("BallSocketConstraint") then
v:Destroy()
end
end
for i, v in pairs(script.Parent.Torso:GetChildren()) do
if v:IsA("Motor6D") then
v.Part0 = Character.Torso
end
end
end
end)

1 comment
Yes, i did try setting the body part CanCollide to true but the game automatically switces it back to false on the arms, legs and head, is there another method?