Skip to main content

Setting up

We recommend using Visual Studio Code as your IDE. Other IDEs also work, this is usually down to personal preference. The Lua file must be a .lua [or .luau] file and getconstant.cc/Luas folder for it to be registered.

Format

Luas are required to have 2 base functions, .Load and .Unload. Alongside these, you must also return the Lua’s module at the end of the script. These are necessities, without this your lua will not work.

We recommend following this format:
local Lua = {}

Lua.Load = function(Modules)
    warn("Lua is loaded! Listing modules now...")

    for Index, Value in next, Modules do
        print(Index, Value)
    end
end

Lua.Unload = function(Modules)
    warn("Lua is unloaded.")
end

return Lua