What do you want to achieve? A nonflying ragdoll system
What is the issue? I do not know how to make the player stay ragdolled on the floor and not continuously fly in the air. Also, how would i revert the ragdoll if i ever needed to so the player can walk freely again.
local Character = game.Players.LocalPlayer.Character
task.wait(10)
Character.Humanoid.BreakJointsOnDeath = false
for i,v in Character:GetDescendants() do
if v:IsA("Motor6D") then
local Attachment0 = Instance.new("Attachment")
Attachment0.CFrame = v.C0
Attachment0.Parent = v.Part0
local Attachment1 = Instance.new("Attachment")
Attachment1.CFrame = v.C1
Attachment1.Parent = v.Part1
local BallSocketConstraint = Instance.new("BallSocketConstraint")
BallSocketConstraint.Attachment0 = Attachment0
BallSocketConstraint.Attachment1 = Attachment1
BallSocketConstraint.Parent = v.Part0
v:Destroy()
end
if v:IsA("BasePart") then
v.CanCollide = true
end
Character.HumanoidRootPart.CanCollide = false
end
Ragdoll.rbxl (63.8 KB)
Here, I’ve provided you with a personal favorite of mine. It’s a really good ragdoll script that doesn’t flop around or fly like you said. To use it, simply require the module script in replicated storage, and do misc.Ragdoll(the target you want to ragdoll, and the duration). Obviously you can mess around with it so that as long as the player is falling, they stay ragdolled. Sadly this does only work in r6 so I hope you can either use it, or modify it to fit your game. I’ve also made an example so if you join the game, and press f, you character should get ragdolled. Set the game settings avatar to r6 before hand btw.
Yes you do need everything in order for the whole thing to work. (except for the localscript, serverscript just named “script” and the remote event, i put those in there so you could test it.)
If you wanted to instantly unragdoll the character, you can remove the boolvalue named “Ragdoll” in the players character. Once this gets removed, the character will instantly get up. If you look inside my serverscript named “script” you can see how i ragdolled the character using misc.Ragdoll function.
It is but you could easily change it. Let’s say you wanted to make it so that as long as the target is falling, they don’t get unragdolled. You could change the duration parameter in the script to be a string like “falling.” Then, in the misc module script, where the misc.ragdoll function is handled, you can check if the value of duration is “falling” and if it is, repeat until the player is no longer falling.
yeah i see the issue. number 1 you didn’t set the game settings avatar to r6, so you got the error for the shape of the head. number 2, you didn’t require the module script. instead, do something like this:
local Misc = require(game.ReplicatedStorage:WaitForChild("Misc"))
local Character = game.Players.LocalPlayer.Character
task.wait(10)
Misc.Ragdoll(Character, 10)
Interesting, it might be because the whole thing is handled on a localscript. Instead, how about you call a remote event in place of the misc.Ragdoll in the local script after 10 seconds have passed, then place a script in serverscriptservice that listens for the event and uses misc.Ragdoll.