Basically, I’m working on an npc that ragdolls when it dies, While making the ragdoll script, I came across this weird bug! Help would be appreciate
Script:
for i,v in pairs(script.Parent:GetDescendants()) do
if v:IsA("Motor6D") and v.Parent.Name ~= "HumanoidRootPart" then
local Socket = Instance.new("BallSocketConstraint")
local a1 = Instance.new("Attachment")
local a2 = Instance.new("Attachment")
a1.Parent = v.Part0
a2.Parent = v.Part1
Socket.Parent = v.Parent
Socket.Attachment0 = a1
Socket.Attachment1 = a2
a1.CFrame = v.C0
a2.CFrame = v.C1
Socket.LimitsEnabled = true
Socket.TwistLimitsEnabled = true
v:Destroy()
script.Parent.Humanoid.HipHeight = 0
end
end
script.Parent.Character.Humanoid.RequiresNeck = false
script.Parent.Character.Humanoid.Sit = true