What I’m trying to do:
Achieve a ragdoll system where I can pick up or execute a player, and let them get up after a certain time( like in gpo)
What the problem is:
my script doesnt ragdoll the character, theres no limbs moving or rotating its all stiff unlike what I scripted it to do.
This is the script:
hum.Health = 0
hum:SetStateEnabled(Enum.HumanoidStateType.Ragdoll, true)
hum:SetStateEnabled(Enum.HumanoidStateType.GettingUp, false)
local RunService = game:GetService("RunService")
hum:ChangeState(Enum.HumanoidStateType.FallingDown)
for i,v in pairs(char:GetChildren()) do
if v:IsA("Part") and v:FindFirstChildOfClass("Attachment") and v.Name ~= "HumanoidRootPart" then -- v is the part u wanna rotate
local A = Instance.new("Attachment",v) -- Attachment on the target
local B = Instance.new("Attachment",humrp) -- attachment on the unused, humanoid rootpart not affecting by animations
A.WorldPosition = B.WorldPosition
local BS = Instance.new("BallSocketConstraint",v) -- joint basically, to rotate on
BS.Attachment0 = A
BS.Attachment1 = B
BS.TwistLimitsEnabled = true
BS.LimitsEnabled = true
BS.Restitution = 0
BS.UpperAngle = 90
BS.TwistLowerAngle = -90
BS.TwistUpperAngle = 90
table.insert(Attachments,A)
table.insert(Attachments,B)
table.insert(balls,BS)
end
end
for i,v in pairs(motors) do
if v.Name ~= "Neck" then
v.Enabled = false
end
end
humrp.Velocity = humrp.CFrame.lookVector*10+Vector3.new(0,1,0)
done = true
It uses a ball socket constraint, I’m trying to make the limbs rotate and stuff
What I’ve tried:
I’ve tried looking at other ragdoll scripts and seeing what’s wrong but nothing so far. I’ve tried modifying the properties on the ball socker constraint but nothing changes, I’ve tried setting the limbs to cancollide off but the problem still persists.