Skip to main content

RagdollSystem

Types

SystemSettings

type SystemSettings = {
LowDetailModeThresholdnumber,
CollapseTimoutIntervalnumber,
CollapseTimeoutDistanceThresholdnumber,
FreezeIfDeadboolean,
}

LowDetailModeThreshold: the number of active ragdolls before the system starts using low detail mode.

CollapseTimeoutInterval: the interval in seconds between ragdoll distance checks while collapsed.

CollapseTimeoutDistanceThreshold: the minimum distance in studs a ragdoll must have moved between distance checks to remain collapsed.

FreezeIfDead: Whether the system freezes dead ragdolls that have stopped moving

Properties

Blueprint

This item is read only and cannot be modified. Read Only
RagdollSystem.Blueprint: Blueprint

A reference to the base Blueprint class

RagdollFactory

This item is read only and cannot be modified. Read Only
RagdollSystem.RagdollFactory: RagdollFactory

A reference to the Ragdoll Factory

RagdollConstructed

This item is read only and cannot be modified. Read Only
RagdollSystem.RagdollConstructed: Signal

Fires when a ragdoll is constructed by the Ragdoll Factory.

RagdollSystem.RagdollConstructed:Connect(function(ragdoll: Ragdoll)
	doSomething(ragdoll)
end)

Functions

setSystemSettings

RagdollSystem:setSystemSettings(settingsDictionarySystemSettings) → ()

Sets the settings of the system, all fields are optional. If a field is not provided, it remains unchanged.

	RagdollSystem:setSystemSettings({
		FreezeIfDead = false,
	}) -- This is ok.

getSystemSettings

RagdollSystem:getSystemSettings() → SystemSettings

getRagdoll

RagdollSystem:getRagdoll(ragdollModelModel) → Ragdoll?

Returns the ragdoll corresponding to the model or nil if there isn't one.

activateRagdoll

RagdollSystem:activateRagdoll(ragdollModelModel) → ()

Activates ragdoll physics on the ragdoll.

deactivateRagdoll

RagdollSystem:deactivateRagdoll(ragdollModelModel) → ()

Deactivates ragdoll physics on the ragdoll.

collapseRagdoll

RagdollSystem:collapseRagdoll(ragdollModelModel) → ()

Activates ragdoll physics on the ragdoll, deactivates ragdoll physics after the ragdoll has remained still for 1+ seconds.

addRagdoll

RagdollSystem:addRagdoll(
ragdollModelModel,
blueprintBlueprint?
) → Ragdoll

Creates and caches a ragdoll corresponding to the Model.

replicateRagdoll

This item only works when running on the client. Client
RagdollSystem:replicateRagdoll(
ragdollModelModel,
blueprintBlueprint?
) → Ragdoll

Creates and caches a Ragdoll from a model that already has its Constraints constructed.

removeRagdoll

RagdollSystem:removeRagdoll(ragdollModelModel) → ()

Destroys the ragdoll corresponding to the model and removes it from the cache.

getPlayerRagdoll

RagdollSystem:getPlayerRagdoll(playerPlayer) → Ragdoll?

Returns the ragdoll corresponding to player's character or nil if there isnt one.

getLocalRagdoll

This item only works when running on the client. Client
RagdollSystem:getLocalRagdoll() → Ragdoll?

Returns the ragdoll coresponding to the local player's character.

activateLocalRagdoll

This item only works when running on the client. Client
RagdollSystem:activateLocalRagdoll() → ()

Activates ragdoll physics on the local player's ragdoll.

deactivateLocalRagdoll

This item only works when running on the client. Client
RagdollSystem:deactivateLocalRagdoll() → ()

Deactivates ragdoll physics on the local player's ragdoll.

collapseLocalRagdoll

This item only works when running on the client. Client
RagdollSystem:collapseLocalRagdoll() → ()

Activates ragdoll physics on the local player's ragdoll, deactivates ragdoll physics after the ragdoll has remained still.

Show raw api
{
    "functions": [
        {
            "name": "setSystemSettings",
            "desc": "Sets the settings of the system, all fields are optional. If a field is not\nprovided, it remains unchanged.\n\n```lua\n\tRagdollSystem:setSystemSettings({\n\t\tFreezeIfDead = false,\n\t}) -- This is ok.\n```",
            "params": [
                {
                    "name": "settingsDictionary",
                    "desc": "",
                    "lua_type": "SystemSettings"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 193,
                "path": "lib/init.lua"
            }
        },
        {
            "name": "getSystemSettings",
            "desc": "",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "SystemSettings"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 229,
                "path": "lib/init.lua"
            }
        },
        {
            "name": "getRagdoll",
            "desc": "Returns the ragdoll corresponding to the model or nil if there isn't one.",
            "params": [
                {
                    "name": "ragdollModel",
                    "desc": "",
                    "lua_type": "Model"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Ragdoll?\r\n"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 237,
                "path": "lib/init.lua"
            }
        },
        {
            "name": "activateRagdoll",
            "desc": "Activates ragdoll physics on the ragdoll.",
            "params": [
                {
                    "name": "ragdollModel",
                    "desc": "",
                    "lua_type": "Model"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 245,
                "path": "lib/init.lua"
            }
        },
        {
            "name": "deactivateRagdoll",
            "desc": "Deactivates ragdoll physics on the ragdoll.",
            "params": [
                {
                    "name": "ragdollModel",
                    "desc": "",
                    "lua_type": "Model"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 253,
                "path": "lib/init.lua"
            }
        },
        {
            "name": "collapseRagdoll",
            "desc": "Activates ragdoll physics on the ragdoll, deactivates ragdoll physics after the ragdoll has remained still for 1+ seconds.",
            "params": [
                {
                    "name": "ragdollModel",
                    "desc": "",
                    "lua_type": "Model"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 261,
                "path": "lib/init.lua"
            }
        },
        {
            "name": "addRagdoll",
            "desc": "Creates and caches a ragdoll corresponding to the Model.",
            "params": [
                {
                    "name": "ragdollModel",
                    "desc": "",
                    "lua_type": "Model"
                },
                {
                    "name": "blueprint",
                    "desc": "",
                    "lua_type": "Blueprint?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Ragdoll\r\n"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 270,
                "path": "lib/init.lua"
            }
        },
        {
            "name": "replicateRagdoll",
            "desc": "Creates and caches a Ragdoll from a model that already has its Constraints constructed.",
            "params": [
                {
                    "name": "ragdollModel",
                    "desc": "",
                    "lua_type": "Model"
                },
                {
                    "name": "blueprint",
                    "desc": "",
                    "lua_type": "Blueprint?"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Ragdoll\r\n"
                }
            ],
            "function_type": "method",
            "realm": [
                "Client"
            ],
            "source": {
                "line": 282,
                "path": "lib/init.lua"
            }
        },
        {
            "name": "removeRagdoll",
            "desc": "Destroys the ragdoll corresponding to the model and removes it from the cache.",
            "params": [
                {
                    "name": "ragdollModel",
                    "desc": "",
                    "lua_type": "Model"
                }
            ],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 292,
                "path": "lib/init.lua"
            }
        },
        {
            "name": "getPlayerRagdoll",
            "desc": "Returns the ragdoll corresponding to player's character or nil if there isnt one.",
            "params": [
                {
                    "name": "player",
                    "desc": "",
                    "lua_type": "Player"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Ragdoll?\r\n"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 306,
                "path": "lib/init.lua"
            }
        },
        {
            "name": "getLocalRagdoll",
            "desc": "Returns the ragdoll coresponding to the local player's character.",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "Ragdoll?\r\n"
                }
            ],
            "function_type": "method",
            "realm": [
                "Client"
            ],
            "source": {
                "line": 314,
                "path": "lib/init.lua"
            }
        },
        {
            "name": "setLocalRagdoll",
            "desc": "Sets the local player's ragdoll.",
            "params": [
                {
                    "name": "ragdoll",
                    "desc": "",
                    "lua_type": "Ragdoll"
                }
            ],
            "returns": [],
            "function_type": "method",
            "realm": [
                "Client"
            ],
            "private": true,
            "source": {
                "line": 323,
                "path": "lib/init.lua"
            }
        },
        {
            "name": "activateLocalRagdoll",
            "desc": "Activates ragdoll physics on the local player's ragdoll.",
            "params": [],
            "returns": [],
            "function_type": "method",
            "realm": [
                "Client"
            ],
            "source": {
                "line": 331,
                "path": "lib/init.lua"
            }
        },
        {
            "name": "deactivateLocalRagdoll",
            "desc": "Deactivates ragdoll physics on the local player's ragdoll.",
            "params": [],
            "returns": [],
            "function_type": "method",
            "realm": [
                "Client"
            ],
            "source": {
                "line": 339,
                "path": "lib/init.lua"
            }
        },
        {
            "name": "collapseLocalRagdoll",
            "desc": "Activates ragdoll physics on the local player's ragdoll, deactivates ragdoll physics after the ragdoll has remained still.",
            "params": [],
            "returns": [],
            "function_type": "method",
            "realm": [
                "Client"
            ],
            "source": {
                "line": 347,
                "path": "lib/init.lua"
            }
        }
    ],
    "properties": [
        {
            "name": "Blueprint",
            "desc": "A reference to the base Blueprint class",
            "lua_type": "Blueprint",
            "readonly": true,
            "source": {
                "line": 37,
                "path": "lib/init.lua"
            }
        },
        {
            "name": "RagdollFactory",
            "desc": "A reference to the Ragdoll Factory",
            "lua_type": "RagdollFactory",
            "readonly": true,
            "source": {
                "line": 45,
                "path": "lib/init.lua"
            }
        },
        {
            "name": "RagdollConstructed",
            "desc": "Fires when a ragdoll is constructed by the Ragdoll Factory.\n\n```lua\nRagdollSystem.RagdollConstructed:Connect(function(ragdoll: Ragdoll)\n\tdoSomething(ragdoll)\nend)\n```",
            "lua_type": "Signal",
            "readonly": true,
            "source": {
                "line": 60,
                "path": "lib/init.lua"
            }
        }
    ],
    "types": [
        {
            "name": "SystemSettings",
            "desc": "`LowDetailModeThreshold`: the number of active ragdolls before the system \nstarts using low detail mode.\n\n`CollapseTimeoutInterval`: the interval in \nseconds between ragdoll distance checks while collapsed.<br/>\n\n`CollapseTimeoutDistanceThreshold`: the minimum distance in studs a ragdoll\nmust have moved between distance checks to remain collapsed.\n\n`FreezeIfDead`: Whether the system freezes dead ragdolls that have stopped\nmoving",
            "lua_type": "{ LowDetailModeThreshold: number, CollapseTimoutInterval: number, CollapseTimeoutDistanceThreshold: number, FreezeIfDead: boolean, }",
            "source": {
                "line": 20,
                "path": "lib/Types.lua"
            }
        }
    ],
    "name": "RagdollSystem",
    "desc": "",
    "source": {
        "line": 5,
        "path": "lib/init.lua"
    }
}