GetNetworkOwner

Constructor:

GetNetworkOwner()

Description

Returns the player who is owning this part. It can only be called by server scripts.

Return Value

Class Name Description
RWObject Returns the player who is owning this part. If the part has no owner, the server returns nil.

Examples

Create a part, and output the name of the player who is owning this part when the part is touched by the local player.

local part = WorkSpace. Part
local owner = part:GetNetworkOwner()