SetNetworkOwner

Constructor:

SetNetworkOwner(player)

Description

Sets the ownership of this part and all other parts connected to it. It can only be called by server scripts.

Parameter

Name Class Name Description
Player RWObject Sets the ownership to a specified client. If the parameter is nil, sets the the ownership to the server.

Examples

Create a part, set its ownership to a player and output the player name.

local part = WorkSpace. Part
Players.PlayerAdded:Connect(function(id) 
local player = Players:GetPlayerByUserId(id) 
    part:SetNetworkOwner(player)
end)