So I just had my rigs switched to bones and animated in blender, but my ragdoll system broke (obviously) and I’m having trouble reimplementing it.
The goal is to have the abdomen (big part in the back) react to physics whenever the player backs into something etc.
Desired affect: https://gyazo.com/bf66921ad13656082461e0e576ed23c5
Current model:
Code I tried (doesn’t work)
local function abdomenPhysics(player)
local character = player.Character
local petioleJoint = character.HumanoidRootPart.LowerTorso.Tail_1.Tail_2
local socket = Instance.new("BallSocketConstraint")
local abdomen = character.Abdomen
local attachment1 = Instance.new("Attachment")
local attachment2 = Instance.new("Attachment")
attachment1.Parent = character.Petiole
attachment2.Parent = character.Abdomen
socket.Parent = character.Petiole
socket.Attachment0 = attachment1
socket.Attachment1 = attachment2
attachment1.CFrame = petioleJoint.CFrame
attachment2.CFrame = petioleJoint.CFrame
socket.LimitsEnabled = true
socket.TwistLimitsEnabled = true
socket.UpperAngle = 0
socket.TwistLowerAngle = 0
socket.TwistUpperAngle = 45
socket.MaxFrictionTorque = 1
abdomen.CustomPhysicalProperties = PhysicalProperties.new(0.1, .5, 1, .2, 1)
abdomen.CanCollide = true
petioleJoint:Destroy()
end