#How stop a character fling after ragdoll ended.

7 messages · Page 1 of 1 (latest)

rose ice
#

I making a script that ragdoll player,
When disabling ragdoll sometimes character fling to air.
How can i stop that?

-- Disable ragdoll and restore original Motor6D states
local function disableRagdoll(player,motors)
    if player and motors then
        local character = player.Character
        local humanoid = character:WaitForChild("Humanoid")

        if character:FindFirstChild("RagdollParts") then
            character:FindFirstChild("RagdollParts"):Destroy()
        end
        
        for _,v in pairs(character:GetDescendants()) do
            if v:IsA('Motor6D') then
                v.Enabled = true
            end
            if v.Name == 'BallSocketConstraint' then
                v:Destroy()
            end
            if v.Name == 'Attachment' then
                v:Destroy()
            end
        end
        
        humanoid:ChangeState(Enum.HumanoidStateType.GettingUp)
        player:SetAttribute("Ragdoll",false)
        local currentPivot = character:GetPivot()
        character:PivotTo(currentPivot + Vector3.new(0,5,0))
        humanoid.PlatformStand = false
        humanoid.AutoRotate = true
    end
end
twilit arrow
#

Hmmm

#

Add a small delay before, for _,v in pairs

#

And in the line character:PivotTo(currentPivot + Vector3.new(0,5,0)) just let the currentPivot not with the vector

#

And after the humanoid.platstand put a small delay

#

@rose ice

rose ice