We’re introducing Meta accounts in August 2022: a new way to log into VR devices that doesn’t require a Facebook account. Learn more


Transfers the ownership of an object to a player

Appearance in Composition Pane

Transfers ownership of an object to a player, this happens automatically when an object is grabbed or attached to a player. But can be done manually with this codeblock for other objects and gizmos. Owning an object means that the player or server (via server player) determines the truth of an object’s current position. This is great when paired with local scripting.

When an object’s script mode is set to local, an ownership transfer of that object will cause the script to reset, the world start event fires and all variables are set back to their initial values. You may need to wait a fraction of a second before sending events to the newly started local script.

object, player
Example 1: Transfer ownership to the owner of self

Imagine you have a baseball with a trail fx, when the player grabs the baseball you could transfer the ownership of the trail to the player who now owns the baseball. This creates a more responsive look and feel.

Next Up