ReferenceReflection

isscriptable

Checks whether a property can be accessed from scripts.

Syntax

isscriptable(object: Instance, property: string) -> boolean?

Also available as

is_scriptable

Parameters

ParameterTypeDescription
objectInstanceThe Instance whose class defines the property.
propertystringThe property name.

Returns

TypeDescription
booleantrue 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.