Ragdoll System Help. Flying Glitch[SOLVED]

  1. What do you want to achieve? A nonflying ragdoll system

  2. 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.

This is the issue on video:
robloxapp-20230924-1549343.wmv (1.6 MB)

Here is what i have so far:

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

4 Likes

still could use sum help pls!!!

2 Likes

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.

5 Likes

perfect cus my game is only in r6 too ! just what i needed will test out rn

3 Likes

do i need the otherscripts as well or just the module script?

3 Likes

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.)

3 Likes

k ty
what functions would i use to ragdoll and then unragdoll easily?

2 Likes

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.

2 Likes

is the duration a required parameter?

2 Likes

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.

2 Likes

it says misc.Ragoll is not a member of Repstorage.Misc

2 Likes

You put a typo it’s misc.Ragdoll not ragoll.

2 Likes

still theres no function in the mod script

2 Likes

can you send me a ss of the module script?

2 Likes

wait there actually is but it wont let me access it, there is also an error bc i have headless on

1 Like

1 Like

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)
2 Likes

oh rightt wait one sec cus i forgot i was on a test baseplate, also how did i forget require lol

1 Like

now i have no errors but it just doesn’t ragdoll me?

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.

1 Like