Garry's Mod Wiki

Revision Difference

Entity:SetFlexWeight#565656

<function name="SetFlexWeight" parent="Entity" type="classfunc"> <description>Sets the weight/value of given flex controller. Setting flex weights spawns an internal networked entity (one per entity face posed) to accommodate networking to clients. <note>Only `96` flex controllers can be set! Flex controllers on models with higher amounts will not be accessible.</note> <warning>This function must be called at every tick, otherwise you will not see any changes.</warning>⤶ </description> <realm>Shared</realm> <args> <arg name="flex" type="number">The ID of the flex to modify weight of. The range is between `0` and <page>Entity:GetFlexNum</page> - 1.</arg> <arg name="weight" type="number">The new weight to set. See <page>Entity:GetFlexBounds</page> for the model-defined input range.</arg> </args> </function>