#how can i unragdoll a player?

28 messages · Page 1 of 1 (latest)

fringe trench
#

local Char = game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:Wait()

local function Ragdoll()
for _, v in pairs(Char:GetDescendants()) do --Char = player.Character
if v:IsA("Motor6D") then
local Att0, Att1 = Instance.new("Attachment"), Instance.new("Attachment")
Att0.CFrame = v.C0
Att1.CFrame = v.C1
Att0.Parent = v.Part0
Att0.Name = "Att0"
Att1.Name = "Att1"

        Att1.Parent = v.Part1
        local BSC = Instance.new("BallSocketConstraint")
        BSC.Attachment0 = Att0
        BSC.Attachment1 = Att1
        BSC.Parent = v.Part0
        BSC.LimitsEnabled = true
        BSC.MaxFrictionTorque = 50
        BSC.TwistLimitsEnabled = true
        BSC.UpperAngle = 90
        BSC.TwistLowerAngle = -90
        BSC.TwistUpperAngle = 90
        BSC.Name = "BSC"
        v.Enabled = false
    end
end
Char.HumanoidRootPart.CanCollide = false

end

local function Unragdoll()
for _, v in pairs(Char:GetDescendants()) do
if v:IsA("Motor6D") then
local Att0 = v.Part0:FindFirstChild("Att0")
local Att1 = v.Part1:FindFirstChild("Att1")
local BSC = v.Part0:FindFirstChild("BSC")

        Att0:Destroy()
        Att1:Destroy()
        BSC:Destroy()
        v.Enabled = true
    end
end

Char.HumanoidRootPart.CanCollide = true

end

task.wait(10)

Ragdoll()

task.wait(15)

Unragdoll()

#

sometimes you can get help from the roblox studio developper forums

umbral mica
#

here

#

well it's not wrong but I don't think is compatible with a Ragdol counterpart

fringe trench
#

oh

#

¨well i got this script from a forum 😅

#

so..

umbral mica
#

one sec let me check before I throw the stone

umbral mica
# fringe trench so..

you should not just give out code that you don't personally know it works or test 😅

#

that's distasteful

fringe trench
#

you're right..

umbral mica
#

but no biggie

#

I'll test it

fringe trench
#

Okay

umbral mica
#
    Humanoid.RequiresNeck = false
    Humanoid.Sit = true
    
    Humanoid.WalkSpeed  = 0
    Humanoid.JumpHeight = 0
fringe trench
#

Oh

#

oh right

#

lol i didn't even checked that

umbral mica
#

the walkspeed is important cause if you're walking and you ragdol the character will start sliding

fringe trench
#

right

umbral mica
#

but if you don't mind that OR you actually want that behavior

#

you can plug in a walkspeed parameter

#

and jumpheight ofc so they don't jump

#

(duh)

#

as for the rest it seems to check out 😄

fringe trench
#

beautiful