Skip to content

setscriptable

Detection risks

setscriptable can expose detection vectors. Games may check whether certain properties are unexpectedly accessible, which can lead to detections.

Limited property support

Not all hidden properties can be obtained using this function.

setscriptable toggles the scriptability of a hidden or non-scriptable property on an Instance. When a property is made scriptable, it can be accessed or assigned through standard indexing.

function setscriptable(instance: Instance, property_name: string, state: boolean): boolean | nil

Parameters

Parameter Description
instance The instance that owns the target property.
property_name The name of the property to make scriptable or un-scriptable.
state Whether to enable (true) or disable (false) scriptability.

Example

Temporarily enabling scriptability of a property
1
2
3
4
5
6
7
local part = Instance.new("Part")

setscriptable(part, "BottomParamA", true)
print(part.BottomParamA) -- Output: -0.5

setscriptable(part, "BottomParamA", false)
print(part.BottomParamA) -- Throws an error