Garry's Mod Wiki

Entity:GetBodygroupCount

  number Entity:GetBodygroupCount( number bodyGroupId )

Description

Returns the number of Sub Models in the Body Group corresponding to a given Body Group ID of the Entity's model.

Weapons will return results from their viewmodels.

Arguments

1 number bodyGroupId
The Body Group ID to retrieve the Sub Model count of.
Body Group IDs start at 0.

Returns

1 number
The number of Sub Models in the Body Group.