Skip to main content

RagdollBindersServer

This item only works when running on the server. Server
This was deprecated in 15.11.2

This item is deprecated. Do not use it for new work.

Holds binders for Ragdoll system. Be sure to initialize on the client too. See RagdollBindersClient. Be sure to use a ServiceBag to initialize this service.

tip

Binders can be retrieved directly through a ServiceBag now.

Properties

Ragdoll

RagdollBindersServer.Ragdoll: Binder<Ragdoll>

Apply this Binder to a humanoid to ragdoll it. Humanoid must already have Ragdollable defined.

local ragdollBinder = serviceBag:GetService(RagdollBindersServer).Ragdoll

local ragdoll = ragdollBinder:Get(humanoid)
if ragdoll then
	print("Is ragdolled")
	ragdollBinder:Unbind(humanoid)
else
	print("Not ragdolled")
	ragdollBinder:Bind(humanoid)
end

You can also use RxBinderUtils.observeBoundClass to observe whether a humanoid is ragdolled using an Observable.

info

Like any usage of Observable, be sure to give the Subscription to a Maid (or call Subscription.Destroy on it) once done with the event connection.

local maid = Maid.new()

local ragdollBinder = serviceBag:GetService(RagdollBindersServer).Ragdoll
maid:GiveTask(RxBinderUtils.observeBoundClass(ragdollBinder, humanoid):Subscribe(function(ragdoll)
	if ragdoll then
		print("Ragdolled!")
	else
		print("Not ragdolled")
	end
end))

Ragdollable

RagdollBindersServer.Ragdollable: PlayerHumanoidBinder<Ragdollable>

Enables ragdolling on a humanoid.

RagdollHumanoidOnDeath

RagdollBindersServer.RagdollHumanoidOnDeath: PlayerHumanoidBinder<RagdollHumanoidOnDeath>

Automatically applies ragdoll upon humanoid death.

RagdollHumanoidOnFall

RagdollBindersServer.RagdollHumanoidOnFall: PlayerHumanoidBinder<RagdollHumanoidOnFall>

Automatically applies ragdoll upon humanoid fall.

UnragdollAutomatically

RagdollBindersServer.UnragdollAutomatically: PlayerHumanoidBinder<UnragdollAutomatically>

Automatically unragdolls the humanoid.

Show raw api
{
    "functions": [],
    "properties": [
        {
            "name": "Ragdoll",
            "desc": "Apply this [Binder] to a humanoid to ragdoll it. Humanoid must already have [Ragdollable] defined.\n\n```lua\nlocal ragdollBinder = serviceBag:GetService(RagdollBindersServer).Ragdoll\n\nlocal ragdoll = ragdollBinder:Get(humanoid)\nif ragdoll then\n\tprint(\"Is ragdolled\")\n\tragdollBinder:Unbind(humanoid)\nelse\n\tprint(\"Not ragdolled\")\n\tragdollBinder:Bind(humanoid)\nend\n```\n\nYou can also use [RxBinderUtils.observeBoundClass] to observe whether a humanoid is ragdolled using an [Observable].\n\n:::info\nLike any usage of [Observable], be sure to give the [Subscription] to a [Maid] (or call\n[Subscription.Destroy] on it) once done with the event connection.\n:::\n\n```lua\nlocal maid = Maid.new()\n\nlocal ragdollBinder = serviceBag:GetService(RagdollBindersServer).Ragdoll\nmaid:GiveTask(RxBinderUtils.observeBoundClass(ragdollBinder, humanoid):Subscribe(function(ragdoll)\n\tif ragdoll then\n\t\tprint(\"Ragdolled!\")\n\telse\n\t\tprint(\"Not ragdolled\")\n\tend\nend))\n```",
            "lua_type": "Binder<Ragdoll>",
            "source": {
                "line": 58,
                "path": "src/ragdoll/src/Server/RagdollBindersServer.lua"
            }
        },
        {
            "name": "Ragdollable",
            "desc": "Enables ragdolling on a humanoid.",
            "lua_type": "PlayerHumanoidBinder<Ragdollable>",
            "source": {
                "line": 65,
                "path": "src/ragdoll/src/Server/RagdollBindersServer.lua"
            }
        },
        {
            "name": "RagdollHumanoidOnDeath",
            "desc": "Automatically applies ragdoll upon humanoid death.",
            "lua_type": "PlayerHumanoidBinder<RagdollHumanoidOnDeath>",
            "source": {
                "line": 72,
                "path": "src/ragdoll/src/Server/RagdollBindersServer.lua"
            }
        },
        {
            "name": "RagdollHumanoidOnFall",
            "desc": "Automatically applies ragdoll upon humanoid fall.",
            "lua_type": "PlayerHumanoidBinder<RagdollHumanoidOnFall>",
            "source": {
                "line": 79,
                "path": "src/ragdoll/src/Server/RagdollBindersServer.lua"
            }
        },
        {
            "name": "UnragdollAutomatically",
            "desc": "Automatically unragdolls the humanoid.",
            "lua_type": "PlayerHumanoidBinder<UnragdollAutomatically>",
            "source": {
                "line": 86,
                "path": "src/ragdoll/src/Server/RagdollBindersServer.lua"
            }
        }
    ],
    "types": [],
    "name": "RagdollBindersServer",
    "desc": "Holds binders for Ragdoll system. Be sure to initialize on the client too. See [RagdollBindersClient].\nBe sure to use a [ServiceBag] to initialize this service.\n\n:::tip\nBinders can be retrieved directly through a [ServiceBag] now.\n:::",
    "realm": [
        "Server"
    ],
    "deprecated": {
        "version": "15.11.2",
        "desc": null
    },
    "source": {
        "line": 13,
        "path": "src/ragdoll/src/Server/RagdollBindersServer.lua"
    }
}