Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

ProtoFlux:SetParent

Sets the parent of Instance (Slot).
(Redirected from ProtoFlux:Set Parent)
Set Parent Slot
*
Next
Instance
NewParent
PreserveGlobalPosition
Slots

Sets the parent of Instance (Slot).

Inputs

* (Call)

Set the parent of Instance (Slot) to NewParent (Slot)

Instance (Slot)

The slot to set the parent of.

NewParent (Slot)

The slot to set the parent of Instance (Slot) to.

PreserveGlobalPosition (bool)

Whether or not to keep the values for Instance (Slot)'s local transforms or to keep it in the same place visually.

This is True by default.

Outputs

Sends an impulse when Instance (Slot) is sucessfully parented to NewParent (Slot), or if NewParent (Slot) is null it will set it to the Root Slot of the World.

Other ways

There are two other ways to achieve a similar result:

By driving the Parent field of a slot; This allows dynamic moving of something into another hierarchy, for example adding context menu to a user's root when parented to an item.

Using ProtoFlux:Write the new parent to the Parent field of a slot; This could be more brittle and doesn't touch any of the transforms.

Examples

See Also

Category:ProtoFlux:Transform - For related notes about changing the position after parenting.