this is the out put
17:40:05.759 GetDecendants is not a valid member of Model “Workspace.noxomos” - Server - RagDoll_Module:9
17:40:05.759 Stack Begin - Studio
17:40:05.760 Script ‘ReplicatedStorage.RagDoll_Module’, Line 9 - function Ragdoll - Studio - RagDoll_Module:9
17:40:05.760 Script ‘ServerScriptService.ToolStun’, Line 68 - Studio - ToolStun:68
script module
--created by noxomos
local Ragdoll = {}
function Ragdoll.Ragdoll(char)
local humanoid = char:FindFirstChild("Humanoid")
for _, joint in pairs(char:GetDecendants()) do
if joint:IsA("Moter6D") then
local socket = Instance.new("BallSocketConstraint", joint.Parent)
local a1 = Instance.new("Attachment")
local a0 = Instance.new("Attachment")
a0.CFrame = joint.C0
a1.CFrame = joint.C1
a0.Name = "Attch"
a1.Name = "Attch"
a0.Parent = joint.Part0
a1.Parent = joint.Part1
local socket = Instance.new("BallSocketConstraint", joint.Parent)
socket.Attachment0 = a0
socket.Attachment1 = a1
socket.LimitsEnabled = true
socket.TwistLimitsEnabled = true
socket.TwistUpperAngle = 70
socket.TwistLowerAngle = 70
joint.Enabled = false
end
end
end
function Ragdoll.Stand(char)
local humanoid = char:FindFirstChild("Humanoid")
local joints = char:GetDecendants()
for _, joint in pairs(joints) do
if joint:IsA("BallSocketConstraint") then
joints:Destroy()
elseif joint:IsA("Attachment") and joint.Name == "Attch" then
joint:Destroy()
elseif joint:IsA("Moter6D") then
joint.Enabled = true
end
end
end
return Ragdoll