You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I would like to have a table containing a full dump of a Roblox Luau script envitonment. (example: {"print" = print} and the rest of the globals)
-
What is the issue? Include screenshots / videos if possible!
- The table returned by
getfenv turns out to be a proxy with metatable pointing to the actual environment
- Roblox locked the metatable of the original environment obtained via
getfenv
-
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
If it exists, I would like one where you can obtain this information in Luau, even if it’s just a array of strings that are the name of the globals or in json
Update: I’ve tried parsing the AutocompleteMetadata.xml file, but it does not include all globals (like newproxy and stuff)
{
"math";
"debug";
"string";
"table";
"coroutine";
"utf8";
"os";
"bit32";
"task";
"getmetatable";
"setmetatable";
"Instance";
"Vector2";
"Vector2int16";
"Vector3";
"Vector3int16";
"CFrame";
"DateTime";
"Region3";
"Region3int16";
"BrickColor";
"Ray";
"UDim";
"UDim2";
"TweenInfo";
"Color3";
"ColorSequence";
"NumberSequence";
"NumberRange";
"Faces";
"Axes";
"ColorSequenceKeypoint";
"NumberSequenceKeypoint";
"Rect";
"PhysicalProperties";
"Random";
"PathWaypoint";
"FloatCurveKey";
"RotationCurveKey";
"RaycastParams";
"RaycastResult";
"OverlapParams";
}