Interactive Ragdoll
A ragdoll module that runs parallel on server and client. (R6 support only) Interactive Ragdoll provides smooth ragdoll across all clients by creating a copy of the character. Works on all R6 Rigs
I WILL BE REMAKING INTERACTIVE RAGDOLL IN A WEEK TO HAVE MORE FEATURES AND BETTER OVERALL, EXPECT IT TO TAKE LONGER I WORK ON A LOT OF THINGS
Upcoming
Interactive Ragdoll will later become ONE module copy and paste into your game. It’ll unpack itself and it’ll function the same but very simplified.
Previews
Shown between 2 clients
Run into NPC
Client toggle other player ragdolls
Initialize a rig with “Character” tag
You can either use the regular ragdoll (not smooth across other clients) which is just the interactive ragdoll module. Or you can use two modules, BodyReplicator (copies the a character) and InteractiveRagdoll to create a smooth ragdoll.
InteractiveRagdoll, doesnt manipulate the motor6d’s instead it creates its own body parts and manipulates those. InteractiveRagdoll creates new body parts because If you disable a motor6d on the client it floats for some reason…
The use of these two modules creates a smooth ragdoll.
In this picture you can see cameras. Cameras on Roblox don’t get replicated and we can store our body parts there for each client.
If you plan you add armor or anything that goes onto your body parts, you’d either need to have a mechanism where if you make the armor server sided, it’ll change the welds on all clients. If you have the armor client sided (recommended and optimized) you can just easily weld it to the new created body part.
Documentation
Documentation Functions
InteractiveRagdoll.new(rig: Instance, rigEnum: RigEnum?): RagdollClass
- Creates a new Ragdoll Class
- Rig is the Character model
- You can get the
RigEnum
withInteractiveRagdoll.RigEnums
- There is only R6, so you can only do
InteractiveRagdoll.RigEnums.R6
InteractiveRagdoll:SetRigEnum(rigEnum: RigEnum): RagdollClass
- Sets the Rig’s Enum
- You can either do it in
InteractiveRagdoll.new
or in this method - Example Usage:
InteractiveRagdoll:SetRigEnum(InteractiveRagdoll.RigEnums.R6)
InteractiveRagdoll:SetBody(bodyPartFolder: Folder?): RagdollClass
- Used for Smoothening
- You need a body from BodyReplicator
BodyReplicator.new(character: model)
- Example Usage:
InteractiveRagdoll:SetBody(BodyReplicator.new(character))
InteractiveRagdoll:Toggle(toggle: boolean?): boolean
- Toggles the ragdoll
Example Usage: InteractiveRagdoll:Toggle(true)
- If no boolean is sent through, then it toggles from on to off.
InteractiveRagdoll:CreateBoolValue(): (BoolValue, RBXScriptConnection)
- Creates a BoolValue
- When the boolvalue is turned on it enables ragdoll, and vice versa
- You can create multiple if needed
Private Functions
InteractiveRagdoll:_partsCollisionEnable(rig: Model, boolean: boolean)
- Sets ragdoll part collisions to specified boolean value
InteractiveRagdoll:_weldsEnable(rig: Model, boolean: boolean)
- Sets ragdoll’s welds to specified boolean value
InteractiveRagdoll:_resetBody()
- Resets ragdolls the body part references
InteractiveRagdoll:_createRagdollInstances()
- Creates ragdoll parts/components (BallSockets, Attachments, Welds… etc.)
InteractiveRagdoll needs to run on the server and client to give smooth output.
Download here
Modules
InteractiveRagdoll.lua (7.5 KB)
BodyReplicator.rbxm (9.5 KB)
Place Download
PlaceDownload.rbxl (89.6 KB)
You can ragdoll a character using
_G.RagdollToggle(character: Model, toggle: boolean)
--[[
toggle is true or false meaning on or off
]]
If you copy and paste all the script in the place and put it inside your game it should function correctly. You first give the rig a tag “Character” and you can use _G.RagdollToggle
Latest Log
- Copies over face instead of creating a new face
- Attaches accessories onto new cloned head
- Head now copies over special mesh
- Fixed ownership error
- Updated InteractiveRagdoll
- Updated BodyReplicator
- Updated PlaceDownload
Check Out my Other Modules Here