Reflection
The Reflection library allows access to and manipulation of hidden or non-scriptable properties of Instances and internal execution context. It is primarily used to bypass standard Luau restrictions in controlled environments.
What can you do?
With the Reflection library, you can:
- Read hidden instance properties using
gethiddenproperty
- Write to hidden instance properties with
sethiddenproperty
- Toggle scriptability of properties using
setscriptable
- Elevate thread permissions with
setthreadidentity
- Query the current thread's permission level with
getthreadidentity
These identities are internally refered to as security context levels, and determine the permissions granted to a thread.
What can't you do?
While powerful, the Reflection library carries detection risks in sensitive environments:
setscriptable
is detectable by games that check for unusual access.- Using these methods irresponsibly may break core game logic or introduce unintended side effects.