Yuari
Documentation

newproxy

Creates a plain userdata, optionally with an empty metatable — same behaviour as Roblox.

Syntax

newproxy(addMeta?: any) -> any

Parameters

ParameterTypeDescription
addMeta?anyThe add meta value used by the call.

Returns

TypeDescription
anyUserdata

Description

newproxy is part of the Core functions library. Core globals are installed in every executor thread and drive output, scheduling and identity.

Each call creates or returns a fresh object or value that you can store and pass to other functions.

Example

local userdata = newproxy(true)
getmetatable(userdata).__index = function() return "value" end
print(userdata.anything)

Notes

  • Core globals are available in every script.