Lua from Modern Roblox (Luau): Difference between revisions
Created page with "{{WIP}} Lua in classic versions of Roblox does not differ much from the current year fundamentally - mostly just the lack of certain Lua functions. This page aims to document the majority of unavailable features as well as provide workarounds (AKA "polyfills"). Modern versions of Roblox use [https://luau-lang.org/ Luau], a scripting language heavily based on Lua 5.1 with performance and utility improvements. Luau is open-source. Before Luau, Roblox used [https://www...." |
|||
Line 16: | Line 16: | ||
The coroutine library provides coroutines, allowing multiple tasks to be performed at the same time within a single script. | The coroutine library provides coroutines, allowing multiple tasks to be performed at the same time within a single script. | ||
=== coroutine.close() === | ==== coroutine.close() ==== | ||
The close function is unavailable. | The close function is unavailable. | ||
Revision as of 03:33, 31 October 2023
Work In Progress This is currently being worked on! Check back later for more information... hopefully. |
Lua in classic versions of Roblox does not differ much from the current year fundamentally - mostly just the lack of certain Lua functions. This page aims to document the majority of unavailable features as well as provide workarounds (AKA "polyfills").
Modern versions of Roblox use Luau, a scripting language heavily based on Lua 5.1 with performance and utility improvements. Luau is open-source.
Before Luau, Roblox used Lua 5.1, adding backported features over time. In classic versions (2006-2012), there are no backported features from later versions of Lua (as far as we know).
Libraries
bit32
The bit32 library provides functions to perform bitwise operations. It was a backported feature from Lua 5.2, so it is unavailable.
coroutine
The coroutine library provides coroutines, allowing multiple tasks to be performed at the same time within a single script.
coroutine.close()
The close function is unavailable.
coroutine.isyieldable()
The isyieldable function is unavailable.
debug
The debug library is a native Lua library providing basic functions for debugging code. In later versions, it is available as a heavily sandboxed version. Here, it is unavailable.
math
The math library is an interface to the standard C math library, providing mathematical functions.
math.clamp()
The clamp function is unavailable.
math.noise()
The noise function is unavailable.
math.round()
The round function is unavailable.
math.sign()
The sign function is unavailable.
os
The os library is a native Lua library providing information about the system. In later versions, it's available as a heavily sandboxed version exclusively to provide system time information. Here, it is unavailable.
string
The string library provides string manipulation functions.
string.pack()
The pack function is unavailable.
string.packsize()
The packsize function is unavailable.
string.split()
The split function is unavailable.
string.unpack()
The unpack function is unavailable.
table
The table library provides table/array manipulation functions.
table.clear()
The clear function is unavailable.
table.clone()
The clone function is unavailable.
table.create()
The create function is unavailable.
table.find()
The find function is unavailable.
table.freeze()
The freeze function is unavailable.
table.isfrozen()
The isfrozen function is unavailable.
table.move()
The move function is unavailable.
table.pack()
The pack function is unavailable.
table.unpack()
The unpack function is unavailable.
task
In later versions, the task library allows for functions and threads to be scheduled with the Task Scheduler. It is unavailable here.
utf8
In later versions, the utf8 library provides basic support for UTF-8 encoding. It is unavailable here.