Skip to content

Reflection

Functions for accessing hidden properties, manipulating scriptable flags, and interacting with low-level Instance data that is normally inaccessible through standard Roblox APIs.

gethiddenproperty

Reads a non-scriptable (hidden) property from an Instance.

lua
gethiddenproperty(instance: Instance, property: string) -> any
ParameterTypeDescription
instanceInstanceThe Instance to read from
propertystringThe property name

Example

lua
local workspace = game:GetService("Workspace")
local value = gethiddenproperty(workspace, "StreamingMinRadius")
print(value)

sethiddenproperty

Sets a non-scriptable (hidden) property on an Instance.

lua
sethiddenproperty(instance: Instance, property: string, value: any) -> void
ParameterTypeDescription
instanceInstanceThe Instance to modify
propertystringThe property name
valueanyThe value to set

Example

lua
sethiddenproperty(workspace, "StreamingMinRadius", 256)

getproperties

Returns a dictionary of all property values on an Instance, including non-scriptable properties.

lua
getproperties(instance: Instance) -> table
ParameterTypeDescription
instanceInstanceThe Instance to read properties from

Example

lua
local props = getproperties(workspace)
for name, value in pairs(props) do
    print(name, "=", value)
end

setscriptable

Sets whether a property is scriptable (accessible from Lua) on an Instance.

Aliases: setpropertyable

lua
setscriptable(instance: Instance, property: string, scriptable: boolean) -> void
ParameterTypeDescription
instanceInstanceThe Instance to modify
propertystringThe property name
scriptablebooleantrue to make scriptable, false to make non-scriptable

Example

lua
-- Make a hidden property accessible normally
setscriptable(workspace, "StreamingMinRadius", true)
print(workspace.StreamingMinRadius) -- Now accessible!

isscriptable

Returns true if the given property is scriptable on the Instance.

lua
isscriptable(instance: Instance, property: string) -> boolean

Example

lua
print(isscriptable(workspace, "Name"))               --> true
print(isscriptable(workspace, "StreamingMinRadius"))  --> false (hidden)

geteventmember

Creates an unrestricted signal for the specified event on an Instance. Useful for accessing events that are normally restricted.

lua
geteventmember(instance: Instance, event_name: string) -> RBXScriptSignal
ParameterTypeDescription
instanceInstanceThe Instance containing the event
event_namestringThe name of the event

Example

lua
local signal = geteventmember(game, "Loaded")
signal:Connect(function()
    print("Game loaded!")
end)

getnamecallmethod

Returns the current namecall method string. Typically used inside __namecall hooks to determine which method was called.

lua
getnamecallmethod() -> string

Example

lua
local mt = getrawmetatable(game)
local old_namecall = mt.__namecall

setreadonly(mt, false)
mt.__namecall = newcclosure(function(self, ...)
    local method = getnamecallmethod()
    if method == "Kick" then
        return -- Block kick
    end
    return old_namecall(self, ...)
end)
setreadonly(mt, true)

setnamecallmethod

Sets the namecall method for the current thread. Changes what getnamecallmethod() returns.

lua
setnamecallmethod(method: string) -> void
ParameterTypeDescription
methodstringThe namecall method name to set

Example

lua
-- Inside a __namecall hook
setnamecallmethod("FindFirstChild")

isrenderobj

Returns true if the given object is a Drawing render object.

lua
isrenderobj(object: any) -> boolean

Example

lua
local circle = Drawing.new("Circle")
print(isrenderobj(circle)) --> true
print(isrenderobj(workspace)) --> false
circle:Remove()

getcallbackvalue

Returns the callback function assigned to a callback property of an Instance.

lua
getcallbackvalue(instance: Instance, property: string) -> function?
ParameterTypeDescription
instanceInstanceThe Instance to read from
propertystringThe callback property name

Example

lua
local remote = Instance.new("BindableFunction")
remote.OnInvoke = function()
    return "hello"
end

local callback = getcallbackvalue(remote, "OnInvoke")
print(callback()) --> "hello"