Garry's Mod Wiki

Garry's Mod Wiki

  Entity Entity:BecomeRagdollOnClient()

Description

Spawns a clientside ragdoll for the entity, positioning it in place of the original entity, and makes the entity invisible. It doesn't preserve flex values (face posing) as CSRagdolls don't support flex.

It does not work on players. Use Player:CreateRagdoll instead.

The original entity is not removed, and neither are any ragdolls previously generated with this function.

To make the entity re-appear, run Entity:SetNoDraw( false )

Returns

1 Entity
The created ragdoll. (class C_ClientRagdoll])

Example

Spawns a ragdoll for all NPCs.

for i, npc in ipairs( ents.FindByClass( "npc_*" ) ) do npc.RagDoll = npc:BecomeRagdollOnClient() end

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...