Data type
SecurityCapabilities
A set of SecurityCapability items. See
script capabilities.
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 2#
| new | Returns a new set of capabilities from zero or more
SecurityCapability items. |
| fromCurrent | Returns a new set of capabilities from the capabilities of the calling function. |
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| Name | Type | Default | Description |
|---|---|---|---|
... | SecurityCapability | Zero or more SecurityCapability values to include in the new
set. |
fromCurrent()#
Returns a new set of capabilities from the capabilities of the calling function.
Methods 6#
| Add | Returns a new set of capabilities with zero or more additions. |
| Add | Returns a new set of capabilities with the provided set added. |
| Remove | Returns a new set of capabilities with zero or more deletions. |
| Remove | Returns a new set of capabilities with the provided set deleted. |
| Contains | Returns whether a set of capabilities contains the specified
SecurityCapability items. |
| Contains | Returns whether a set of capabilities contains another set of capabilities. |
Add(...: SecurityCapability): SecurityCapabilities#
Returns a new set of capabilities with zero or more additions. If you add
SecurityCapability items that are already present, they are not
duplicated.
| Name | Type | Default | Description |
|---|---|---|---|
... | SecurityCapability | Zero or more SecurityCapability values to add to the set. |
Returns
SecurityCapabilities— A new set containing the union of the original capabilities and the specified additions.
Add(capabilities: SecurityCapabilities): 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.
| Name | Type | Default | Description |
|---|---|---|---|
capabilities | SecurityCapabilities | A SecurityCapabilities set whose items are added to the original. |
Returns
SecurityCapabilities— A new set containing the union of both sets.
Remove(...: SecurityCapability): SecurityCapabilities#
Returns a new set of capabilities with zero or more deletions.
SecurityCapability items not present in the original set are
ignored.
| Name | Type | Default | Description |
|---|---|---|---|
... | SecurityCapability | Zero or more SecurityCapability values to remove from the set. |
Returns
SecurityCapabilities— A new set with the specified capabilities removed.
Remove(capabilities: SecurityCapabilities): SecurityCapabilities#
Returns a new set of capabilities with the provided set deleted.
SecurityCapability items not present in the original set are
ignored.
| Name | Type | Default | Description |
|---|---|---|---|
capabilities | SecurityCapabilities | A SecurityCapabilities set whose items are removed from the
original. |
Returns
Contains(...: SecurityCapability): boolean#
Returns whether a set of capabilities contains the specified
SecurityCapability items. The set must contain all provided
items to return true.
| Name | Type | Default | Description |
|---|---|---|---|
... | SecurityCapability | Zero or more SecurityCapability values to check for membership
in the set. |
Returns
boolean
Contains(capabilities: SecurityCapabilities): boolean#
Returns whether a set of capabilities contains another set of capabilities. The set must contain all items in the provided set to return true.
| Name | Type | Default | Description |
|---|---|---|---|
capabilities | SecurityCapabilities | A SecurityCapabilities set to check for membership in the original
set. |
Returns
boolean