#ragdoll issue

1 messages · Page 1 of 1 (latest)

prisma monolith
#

hello guys someone know how to fix my ragdoll

function this:removeRagdollInstances(character: Model)    
    this:checkRunType(character, true)

    if (character) then
        local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")
        local humanoid = character:FindFirstChildWhichIsA("Humanoid")
        local ragdollFolder = character:FindFirstChild("Ragdoll")

        if (humanoid and humanoidRootPart and ragdollFolder) then
            if (isServer) then
                for _, descendant in pairs(character:GetDescendants()) do
                    if (descendant:IsA("BasePart")) then
                        descendant.CollisionGroup = "Default"
                    else
                        local part0 = instancesData["motors6D"][descendant]
                        if (part0) then
                            instancesData["motors6D"][descendant] = nil
                            descendant.Part0 = part0
                        end
                    end
                end

                ragdollFolder:Destroy()

                local player = services_plrs:GetPlayerFromCharacter(character)
                if player then
                    humanoidRootPart:SetNetworkOwnershipAuto()
                end
            end

            humanoid:ChangeState(Enum.HumanoidStateType.GettingUp)
            humanoid.PlatformStand = false
            humanoid.AutoRotate = true
            humanoid.WalkSpeed = 16
            humanoid.JumpPower = 50
            humanoidRootPart.CanCollide = true
        end
    end

    return
end```
mental turtleBOT
#

studio** You are now Level 1! **studio

prisma monolith
#

everything works fine but the player falls for 1 second before getting up
idk why

glass mauve
#

whats the issue?

prisma monolith
#
function this:createRagdollInstances(character: Model)    
    if (character) then
        local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")
        local humanoid = character:FindFirstChildWhichIsA("Humanoid")

        if (humanoid and humanoidRootPart and not character:FindFirstChild("Ragdoll")) then

            if (isServer) then
                humanoidRootPart:SetNetworkOwner(nil)
            end

            humanoid:SetStateEnabled(Enum.HumanoidStateType.FallingDown, false)

            humanoid:ChangeState(Enum.HumanoidStateType.Physics)
            humanoid.PlatformStand = true
            humanoid.AutoRotate = false
            humanoid.WalkSpeed = 0
            humanoid.JumpPower = 0
            humanoidRootPart.CanCollide = false

            if (this:checkRunType(character, false)) then
                return
            end

            local ragdollFolder = Instance.new("Folder", character)
            ragdollFolder.Name = "Ragdoll"

            local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")
            for _, descendant in pairs(character:GetDescendants()) do
                local accessory = descendant:FindFirstAncestorWhichIsA("Accessory")
                local tool = descendant:FindFirstAncestorWhichIsA("Tool")
                if (descendant:IsDescendantOf(humanoidRootPart) or accessory or tool or descendant == humanoidRootPart) then
                    continue
                end

                if (descendant:IsA("BasePart")) then
                    descendant.CollisionGroup = "ragdollCollisionGroup"
                    this:createHitbox(descendant, ragdollFolder)
                elseif (descendant:IsA("Motor6D")) then
                    this:createSockets(descendant, ragdollFolder)
                end
            end
        end
    end

    return
end```
#

the player fall

#

for 1s

glass mauve
#

and you want them to fall for how long?

prisma monolith
#

can i show you a screenshare?

prisma monolith
#

you see the problem?

#

maybe a anchor problem?

glass mauve
#

ohhh is it when them jumping up thats the issue? like when theyre ragdolled they bounce up?

glass mauve
#

hrm

#

im not exactly sure what causes that issue, u could anchor the humanoid root part after they hit the ground :P

#

i dont really have any other ideas :P

prisma monolith
#

i dont think

tawny fable
#

and make sure it's done on client