Garry's Mod Wiki

Revision Difference

Entity:LookupBone#561990

<function name="LookupBone" parent="Entity" type="classfunc"> <description>Gets the bone index of the given bone name, returns nothing if the bone does not exist.</description> <description>Gets the bone index of the given bone name, returns `nil` if the bone does not exist.</description> <realm>Shared</realm> <args> <arg name="boneName" type="string">The name of the bone. Common generic bones ( for player models and some HL2 models ): * ValveBiped.Bip01_Head1 * ValveBiped.Bip01_Spine * ValveBiped.Anim_Attachment_RH Common hand bones (left hand equivalents also available, replace _R_ with _L_) * ValveBiped.Bip01_R_Hand * ValveBiped.Bip01_R_Forearm * ValveBiped.Bip01_R_Foot * ValveBiped.Bip01_R_Thigh * ValveBiped.Bip01_R_Calf * ValveBiped.Bip01_R_Shoulder * ValveBiped.Bip01_R_Elbow</arg> </args> <rets> <ret name="" type="number">Index of the given bone name</ret>⤶ <ret name="" type="number">Index of the given bone name, or `nil` if the bone doesn't exist on the Entity</ret>⤶ </rets> </function>