isscriptable
Returns whether an Instance property is scriptable (not tagged notscriptable).
function isscriptable(object: Instance, property: string): boolean | nilSynopsis
How it works
Queries the reflection
PropertyDescriptor for the given property name and returns its isScriptable flag. Returns true if the property can be read/written from Luau, false if it’s a hidden (notscriptable) property, and nil if the property doesn’t exist at all.Relationship to setscriptable
Use this to check the current state before calling
setscriptable(), or to conditionally access hidden properties. If isscriptable returns false, you can either use gethiddenproperty() directly or call setscriptable(inst, prop, true) to make it accessible via normal indexing.Usage
Check then toggle scriptability
local part = Instance.new("Part")
print(isscriptable(part, "BottomParamA")) "cc">-- false
setscriptable(part, "BottomParamA", true)
print(isscriptable(part, "BottomParamA")) "cc">-- true
print(isscriptable(part, "DoesNotExist")) "cc">-- nilParameters
object Instance The Instance that owns the target property.
property string The property name to check.
Returns
boolean | nil true = scriptable, false = notscriptable, nil = property does not exist.
nil on missing property
If the property name is not found on the instance at all, isscriptable returns nil rather than throwing an error.