Garry's Mod Wiki

Entity:SetBodygroup

  Entity:SetBodygroup( number bodyGroupId, number subModelId )

Description

Sets the currently active Sub Model ID for the Body Group corresponding to the given Body Group ID of the Entity's model.

When used on a Weapon, this will modify its viewmodel.

Arguments

1 number bodyGroupId
The Body Group ID to set the Sub Model ID of.
Body Group IDs start at 0.
2 number subModelId
The Sub Model ID to set as active for this Body Group.
Sub Model IDs start at 0.