#Can someone help me with this problem

1 messages · Page 1 of 1 (latest)

grave sage
#

function RagdollModule.Recover(character)
if not character or not savedJoints[character] then return end

local humanoid = character:FindFirstChildOfClass("Humanoid")

task.wait(0.1)

for _, jointData in pairs(savedJoints[character]) do
    -- Verify parts still exist
    if jointData.Part0 and jointData.Part1 and jointData.Parent then
        local newJoint = Instance.new("Motor6D")
        newJoint.Name = jointData.Name
        newJoint.Part0 = jointData.Part0
        newJoint.Part1 = jointData.Part1
        newJoint.C0 = jointData.C0
        newJoint.C1 = jointData.C1
        newJoint.Parent = jointData.Parent
    end
end

if humanoid then
    humanoid:ChangeState(Enum.HumanoidStateType.GettingUp)
end

savedJoints[character] = nil

end
when i try to recover from being hit the body moves freely. Why does this happend`?

left fox
#

the issue is probably because the joints (Motor6D) aren’t being set back correctly when you recover the body parts might not line up right because their positions (C0 and C1) aren't restored properly also if the humanoid state or position isn’t fully reset the body might move freely to fix this make sure the joints and humanoid are properly restored and check if the humanoid's position is reset correctly

left fox
#

i only know basic code but i say try asking ai for help?