Ragdoll Script R15 and R6 [PC, Mobile, Xbox]

It seems that the shaking is not caused by the removal of input. And somehow the input scripts seems to be repeating my death screen script 3 times (I used print() and it printed 3 times) and making everything of the screen go wrong.

I’ve just tested and it seems that this line in input is the line that broke my death screen.
The function that activates the death screen is connected to Humanoid.Died.

H:ChangeState(Enum.HumanoidStateType.Ragdoll)

Everything works fine after this line of code is disabled. But it seems that disabling it causes the avatar to float instead of ragdolling normally.

Nope, I am more than just sure that it’s caused by Input’s removal. Shaking is actually caused by the animations running on Humanoid which don’t stop until they’re stopped internally and to prevent further animation calls I disable Animate script inside character. We can continue the discussion in PMs.

But I tested it and it still shakes when I have input inside StarterGui.

This is really cool, I’ll definitely use this in my upcoming game!

2 Likes

No, it’s not from that entirely; when in R6, if you’re stunned; your camera moves hectically. Most likely because it’s looking for a proper thing to track which is easily fixable.;

I dealt with this issue when redoing the system and making my own variant (thank you for giving us this code to work off of).

I have a recommendation for you; instead of using game.Players:GetPlayerFromCharacter(c).DevEnableMouseLock = true, you could just change the cameras subject to the head and it simulates the same thing; except it doesn’t cause issues for the Mouse Lock feature. The player can’t move their character while also being able to still use mouselock.
I figured this would help with certain issues with the ragdoll system, also your Ragdoll does work with R6.

2 Likes

Brought back mouse lock during ragdoll. It used to keep player in shift lock even if it was disable, since there was no way to force shift lock out of player I had to give player option to use shift lock in ragdoll as well. prevents forced shift lock even when shift lock is not there.

1 Like

A fix I found was to set the camera on the local side to their head. That prevents them from doing Moving around in mouselock.

1 Like

what do you mean by local side? You’re right actually, it works when I change CamerSubject from Humanoid to HRP or Head.

1 Like

Updated according to your recommendations! I don’t need to disable shift lock now, solves the issue too. Tysm <3

1 Like

Looking for feedbacks and bugs in case there are any. Also, if you have any ideas which can further improve the model, feel free to share it here. I’ll try to add it if it’s good. :grinning: :grinning: :grinning: :grinning:

1 Like

For anyone that wants to change this to R6, ctrl + f or use the replace tool in all the scripts that these words are in and replace them with their respective R6 body parts

the bodyparts:
"LeftWrist " to LeftArm / “RightWrist” to RightArm
“LeftAnkle” to LeftLeg / “RightAnkle” to RightLeg
“LowerTorso” to Torso

And it should work for R6 if you change all of those values in all scripts

1 Like

Might work. Thanks for your reply. I think there’s only one script, the module script containing those words. I found a fix and I’ll be updating the model in a while. No need to customize or anything it will do everything by itself! Report bugs if u find though.

1 Like

Sorry for bothering you but for some reason the ragdoll doesn’t work on NPCs.
I’m using the following code

local rg = require(game.ServerScriptService.Module)
rg.Joints(workspace.model)
rg.Ragdoll(workspace.model, true)
1 Like

Do I have to call this in a Server Script or does it also work in a Local Script?

1 Like

Hey, I have found an issue where after the player dies standing still they wait a certain amount of time before ragdolling. It is fixed immediately when you go into first person from third, but I’m not sure what is causing it. I can send a video if you need.

2 Likes

Is there a way for it to work on Dummies?

1 Like

Same question here @lagnis7859

1 Like

I have the same issue. It only really happens when the player isn’t moving when ragdolling and goes away when you add velocity.

2 Likes

Apologies for not responding and forgetting to update the module with the Bot function which I had already created for this purpose but it was in my game not in the module. I have added it, please retake the module and test stuff. Thanks for you patience. :smiling_face_with_three_hearts:

I hope it will solve the issue.


I’d suggest you use server script since client has nothing to do with it.


I have myself seen it some times and not just here but in many roblox games, I believe it’s a problem on Roblox’s end.


Let me know if there are any other bugs, I’ll try to fix as soon as I can.


Important - I create collision groups using script in module since many people are new and don’t know some stuff in studio so I did their work simple but you can minimise code by manually creating collision groups which would allow you to use module script in the build mode as well. It will throw error as collision groups don’t exist until the script makes them in game.

1 Like

In this video, I show an NPC being ragdolled. Currently, the function will unragdoll npc after 10 seconds which you can modify according to your needs. It will throw error when you unragdoll npc when it’s destroyed or inexistent.

5 Likes