Ragdoll, issue m6d resetting themselves

I have a ragdoll, I want to connect the players foot to a constraint so they float in the air but when I do that and the player is in ragdoll it tries to automatically reset the motor6ds is there a way to stop it? I tries disabling them and I fell through the floor.

https://gyazo.com/6365b5a5a7ead9a3db5e69f97a6f1320

look at the bottom left corner it stops resetting the m6d when u die

Hmm, have you tried disabling the Motor6d by setting the .Enabled property to false?

I believe the issue might be to do with the animate script of the humanoid, but I’m not sure at all.

I did mention maybe I didn’t explain it well (most likely) but when I did disable the motor6d I fell through the ground. The animate script is also disabled when I go into ragdoll mode.

Hello 1_upz

You can try this script bellow which is a kinda temp ragdoll script I found it with some people who were having kinda the same problem :

– Edit the script based off of what your working on.

local Character = game.Players.LocalPlayer.Character
local Hm = Character:WaitForChild(“Humanoid”)
local HmHRP = Character.HumanoidRootPart
local UIS = game:GetService(“UserInputService”)
local Ragdolling = Instance.new(“BoolValue”)
Ragdolling.Value = false
Ragdolling.Parent = Character
local SocketType = “BallSocketConstraint”
local RagdollKey = Enum.KeyCode.R – Chose what you’d put…

UIS.InputBegan:connect(function(input)
if input.KeyCode == RagdollKey then
local PlayerParts = Character:GetDescendants()
for i,M6D in pairs(PlayerParts) do
if M6D:IsA(“Motor6D”) then
if M6D.Name ~= “Root” then
if not M6D.Parent:FindFirstChildWhichIsA(SocketType) then
local Socket = Instance.new(SocketType)
M6D.Parent = M6D.Part1
Socket.LimitsEnabled = true
Socket.Radius = .25
Socket.TwistLimitsEnabled = false
Socket.TwistLowerAngle = 360
Socket.TwistUpperAngle = -180
Socket.UpperAngle = 90
local M0,M1
if not M6D.Part0:FindFirstChild(M6D.Name … “RigAttachment”) then
print(“A”)
M0 = Instance.new(“Attachment”)
M0.Name = M6D.Name … “RigAttachment”
M0.Parent = M6D.Part0
M0.CFrame = M6D.C0
print(M0.Name … “A0”)
end
if not M6D.Part1:FindFirstChild(M6D.Name … “RigAttachment”) then
M1 = Instance.new(“Attachment”)
M1.Name = M6D.Name … “RigAttachment”
M1.Parent = M6D.Part1
M1.CFrame = M6D.C1
print(M1.Name … “A1”)
end
Socket.Parent = M6D.Parent
Socket.Attachment0 = M6D.Part0:FindFirstChild(M6D.Name … “RigAttachment”)
Socket.Attachment1 = M6D.Part1:FindFirstChild(M6D.Name … “RigAttachment”)
game.Workspace.CurrentCamera.CameraSubject = Character.Head
M6D.Enabled = false
Hm:ChangeState(Enum.HumanoidStateType.Physics)
Ragdolling = true
HmHRP.CanCollide = false
end
end
end
end
end
end)

UIS.InputEnded:connect(function(input)
if input.KeyCode == RagdollKey then
local PlayerParts = Character:GetDescendants()
if Ragdolling == true then
for i,M6DBSC in pairs(PlayerParts) do
if M6DBSC:IsA(SocketType) then
M6DBSC:Destroy()
elseif M6DBSC:IsA(“Motor6D”) then
M6DBSC.Enabled = true
end
end
HmHRP.CFrame = HmHRP.CFrame + Vector3.new(0,2,0)
HmHRP.CanCollide = true
game.Workspace.CurrentCamera.CameraSubject = Character.Humanoid
Hm:ChangeState(Enum.HumanoidStateType.GettingUp)
end
end

1 Like

Good idea, I think this confirms my suspicion that its the fault of the humanoid and thats why it works when the humanoid dies. It’s probably to do with the humanoid state type.

Edit: Hmm,

Did you replace the motor6d with a ball socket constraint like the example script? If not then the limb probably detached and thats why the player fell through the ground.

Yeah, I hope that helped you with your problem. @1_upz

I found out that disabling everything except the Root Motor6D works great.