Skip to content

SecurityCapabilities

Not yet Datatype

A set of SecurityCapability items. See script capabilities.

Not implemented in Nova

This datatype is not registered in Nova's Lua VM. Constructing or receiving it from an API call will not work.

Description

An immutable set of SecurityCapability values that controls which engine APIs and actions a script inside a sandboxed container can access. Assign a SecurityCapabilities value to an instance's Capabilities property to restrict the scripts beneath it.

Capability enforcement takes effect when Workspace.SandboxedInstanceMode is set to SandboxedInstanceMode.Experimental.

Constructors

new Not yet Returns a new set of capabilities from zero or more SecurityCapability items.
SecurityCapabilities.new(...: SecurityCapability)

Returns a new set of capabilities from zero or more SecurityCapability items.

local capabilities = SecurityCapabilities.new(Enum.SecurityCapability.Players,
    Enum.SecurityCapability.Animation,
    Enum.SecurityCapability.Basic)

local newScript = Instance.new("Script")
newScript.Capabilities = capabilities
fromCurrent Not yet Returns a new set of capabilities from the capabilities of the calling function.
SecurityCapabilities.fromCurrent()

Returns a new set of capabilities from the capabilities of the calling function.

Methods

Add Not yet Returns a new set of capabilities with zero or more additions.
SecurityCapabilities:Add(...: SecurityCapability)

Returns a new set of capabilities with zero or more additions. If you add SecurityCapability items that are already present, they are not duplicated.

Add Not yet Returns a new set of capabilities with the provided set added.
SecurityCapabilities:Add(capabilities: SecurityCapabilities)

Returns a new set of capabilities with the provided set added. If you add SecurityCapability items that are already present, they are not duplicated.

Remove Not yet Returns a new set of capabilities with zero or more deletions.
SecurityCapabilities:Remove(...: SecurityCapability)

Returns a new set of capabilities with zero or more deletions. SecurityCapability items not present in the original set are ignored.

Remove Not yet Returns a new set of capabilities with the provided set deleted.
SecurityCapabilities:Remove(capabilities: SecurityCapabilities)

Returns a new set of capabilities with the provided set deleted. SecurityCapability items not present in the original set are ignored.

Contains Not yet Returns whether a set of capabilities contains the specified SecurityCapability items.
SecurityCapabilities:Contains(...: SecurityCapability)

Returns whether a set of capabilities contains the specified SecurityCapability items. The set must contain all provided items to return true.

Contains Not yet Returns whether a set of capabilities contains another set of capabilities.
SecurityCapabilities:Contains(capabilities: SecurityCapabilities)

Returns whether a set of capabilities contains another set of capabilities. The set must contain all items in the provided set to return true.

Roblox reference: SecurityCapabilities