isscriptable
Checks whether a property can be accessed from scripts.
Syntax
isscriptable(object: Instance, property: string) -> boolean?
Also available as
is_scriptable
Parameters
| Parameter | Type | Description |
|---|---|---|
object | Instance | The Instance whose class defines the property. |
property | string | The property name. |
Returns
| Type | Description |
|---|---|
boolean | true when scripts may read and write the property, false when it is hidden. |
Description
A property the class does not have raises an error. setscriptable still returns nil for one.
Many classes have properties the engine stores and replicates but does not let scripts index; reading one raises is not a valid member. isscriptable reads the flag that decides this.
Example
local part = Instance.new("Part")
print(isscriptable(part, "Name"))
print(isscriptable(part, "Size"))
print(isscriptable(game:GetService("Workspace"), "StreamingEnabled"))
These are Game executor contracts. Check build requirements and session lifetimes before using them.
