Ok so I wanna make a ragdoll button, but it wont kill the player, it just ragdolls them and if they click the button again theyll just stand back to normal where they are
local button = script.Parent
local player = game.Players.LocalPlayer
local c = player.Character
button.MouseButton1Click:Connect(function()
--c.Humanoid.RequiresNeck = false
for _, v in pairs(c:GetDescendants()) do
if v:IsA("Motor6D") then
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:Remove()
end
end
c.HumanoidRootPart.CanCollide = false
end)
I heard of this thing called Humanoid.RequiresNeck = false but even that didnt help either I put it just below the function, I also tried changing v:Remove() as that is basically just breakjoints but they still died anyway? im really confused and help would be appreciated

2 comments
https://youtu.be/kzHIs7j1CCs
Okay but maybe if you read my post I actually did try several things to fix it? try reading a bit more slower