Garry's Mod Wiki

Garry's Mod Wiki

  Entity:SetMoveParent( Entity Parent )

Description

Sets the Movement Parent of an entity to another entity.

Similar to Entity:SetParent, except the object's coordinates are not translated automatically before parenting.

Does nothing on client.

Arguments

1 Entity Parent
The entity to change this entity's Movement Parent to.

Example

Sets the Movement Entity of a new entity to Player 1.

local hat = ents.Create("prop_physics") //Position and angles are relative to our future parent. hat:SetPos(Vector(0,0,10)) hat:SetAngles(Angle(0,90,0)) hat:SetMoveParent(Entity(1)) hat:Spawn()

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...