Instances

isnetworkowner

Returns true when the Instance reports a NetworkOwnerV3 value greater than 2.

Syntax

isnetworkowner(instance: Instance): boolean

Arguments

NameTypeDescription
instanceInstanceInstance whose NetworkOwnerV3 hidden property is checked.

Returns

NameTypeDescription
isOwnerbooleantrue when the first NetworkOwnerV3 value is greater than 2; otherwise false.

Description

Returns true when the Instance reports a NetworkOwnerV3 value greater than 2. Errors from reading that hidden property are not caught by this function.

Call it with 1 parameter(s): instance. The argument table explains which values are required and which ones only refine the behavior.

It returns isOwner (boolean). Use the returns table to separate successful values from nil results and recoverable errors.

Example

Check network ownership for a BasePart Instance.

local part = workspace:FindFirstChildWhichIsA("BasePart", true)

if part then
    local ownsNetwork = isnetworkowner(part)
    print(ownsNetwork)
end