game.Players.PlayerAdded:Connect(function(p)
p.CharacterAdded:Connect(function(c)
c.Humanoid.BreakJointsOnDeath = false
c.Humanoid.HealthChanged:Connect(function()
if c.Humanoid.Health < 30 then
for _, v in pairs(c:GetDescendants()) do
if v:IsA("Motor6D") then
c.HumanoidRootPart.CanCollide = false
local a0, a1 = Instance.new("Attachment"), Instance.new("Attachment")
a0.CFrame = v.C0
a1.CFrame = v.C1
a0.Parent = v.Part0
a1.Parent = v.Part1
local b = Instance.new("BallSocketConstraint")
b.Attachment0 = a0
b.Attachment1 = a1
b.Parent = v.Part0
v:Destroy()
end
end
end
c.HumanoidRootPart.CanCollide = false
end)
end)
end)
I only got the script working on the client. Not sure why itβs doing this on the server. I assume itβs networking issues because the constraints are set on the server and not the client.
I think i might need to take another path. I have my older ragdoll script that works fine, but what i was trying to do,
create a tool that can drag the player.
The old ragdoll script didnβt work with that since i could not clic on the Torso.
So i decided to create a new one.
But since the new one is glitchy and im not sure that i would be able to make it work
ill create a ProximityPrompt when the player is ragdolled, and the other players may drag the player by Triggering the Prompt then Setting the Ragdolled Torsoβs CFrame to the Player that drags.