Garry's Mod Wiki

Entity:GetHitBoxCount

  number Entity:GetHitBoxCount( number set )

Description

Gets how many hit boxes are in a given hit box set.

Arguments

1 number set
The number of the hit box set.

Returns

1 number
The number of hit boxes.

Example

Will print out how many hit boxes the client has in each of their hit box sets.

local numHitSetGroups = LocalPlayer():GetHitboxSetCount() for i = 0, numHitSetGroups - 1 do local numHitBoxes = LocalPlayer():GetHitBoxCount( i ) print( "Hit box set " .. i .. " has " .. numHitBoxes .. " hit boxes!" ) end
Output: Hit box set 0 has 17 hit boxes!