Revision Difference
Entity:SetParent#514516
<function name="SetParent" parent="Entity" type="classfunc">⤶
<description>⤶
Sets the parent of this entity, making it move with its parent.⤶
⤶
<note>This does not work on [the world](/gmod/game/GetWorld).</note>⤶
<warning>This can cause undefined physics behaviour when used on entities that don't support parenting. See the [Valve developer wiki](https://developer.valvesoftware.com/wiki/Entity_Hierarchy_(parenting)) for more information.</warning>⤶
</description>⤶
<realm>Shared</realm>⤶
<args>⤶
<arg name="parent" type="Entity" default="NULL">The entity to parent to. Setting this to nil will clear the parent.</arg>⤶
<arg name="attachmentId" type="number" default="-1">The attachment id to use when parenting, defaults to -1 or whatever the parent had set previously.


<note>You must call <page>Entity:SetMoveType</page>( MOVETYPE_NONE ) on the child for this argument to have any effect!</note></arg>⤶
</args>⤶
</function>⤶
⤶