setscriptable
Marks a hidden property as scriptable so ordinary indexing works, returning the previous state.
Signature
setscriptable(instance: Instance, property: string, scriptable: boolean): booleanParameters
instanceInstanceThe instance to change.
propertystringThe property name.
scriptablebooleanWhether the property should be scriptable.
Returns
boolean
Example
local was = setscriptable(workspace, "PhysicsSteppingMethod", true)
print(workspace.PhysicsSteppingMethod) -- plain indexing works now
setscriptable(workspace, "PhysicsSteppingMethod", was) -- put it back