Rules of LuaU - catwastakenwastaken/Roblox-LuaU-by-Example GitHub Wiki
Lua(U) is a high-level language, meaning that .lua and .luau files cannot modify memory directly through code - you cannot manually allocate memory and you cannot manually free memory.
There are functions to collect garbage and search through the stack, but generally speaking, you cannot modify memory directly through Lua(U) like you would in a lower level language like C or C++.
Because Lua(U) is not a low level language, there are also no pointers to memory addresses, although in variables such as functions and tables, they are passed as memory addresses (with the exception of calling functions).
Lua(U) has a few restrictions on what you can do (this is specifically for Roblox):
-
Lua(U) is sandboxed, so you cannot directly modify a user's machine, at least through the Roblox Client.
-
Lua(U) does not have standard I/O libraries within Roblox.
-
All numbers in Lua(U) are double-precision floating-point numbers, and will always use 8 bytes.
-
Lua(U) does not natively support true multithreading with the exception of task spawning and coroutines.
-
Lua(U) does not allow for direct calling of Windows APIs, external libraries, or other low-level APIs. Lua(U) in Roblox does allow requests to external API(s) through HttpService.
-
Lua(U) does not allow for HTTP requests or opening of sockets from the Roblox Client.
-
You can not require() a module from a WebAPI or external URL.