Description:Performs an operation on the Lua garbage collector based on the specified option.
Roblox's Lua sandbox only allows the "count" option to be used, so none of the other standard options are available.

The "count" option returns the total memory in use by Lua (in Kbytes).

Description:Terminates the last protected function called and outputs message as an error message. If the function containing the error is not called in a protected function (pcall), then the script which called the function will terminate.
The error function itself never returns and acts like a script error.

Description:Terminates the last protected function called and outputs message as an error message.

Usually, error adds some information about the error position at the beginning of the message. The level argument specifies how to get the error position. With level 1 (the default), the error position is where the error function was called. Level 2 points the error to where the function that called error was called; and so on. Passing a level 0 avoids the addition of error position information to the message.

Description:Returns the current environment in use by the function. f can be a function or a number that specifies the function at that stack level: Level 1 is the function calling getfenv. If the given function is not a function, or if f is 0, getfenv returns the global environment. The f parameter can be excluded, and it is 1 by default. When using getfenv to get the current environment of a script, it will return the same table every time within the specific thread.

Description:Returns the next element in the array based on a key that was previously retrieved from a call to next.

Example:

days ={"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"}print(next(days))print(next(days,4))

1 Sunday
5 Thursday -- cf. print(days[4]), which gives you Wednesday

Notes:

The order in which the indices are enumerated is not specified, even for numeric indices. To traverse a table in numeric order, use a numerical for or the ipairs function.

The behavior of next is undefined if, during the traversal, you assign any value to a non-existent field in the table. You may however modify existing fields. In particular, you may clear existing fields.

Description:Calls the functionf with the given arguments in protected mode. This means that any error inside f is not propagated; instead, pcall catches the error and returns a status code. Its first result is the status code (a boolean), which is true if the call succeeds without errors. In such case, pcall also returns all results from the call, after this first result. In case of any error, pcall returns false plus the error message.

Description:Receives any number of arguments, and prints their values to the output, using the tostring function to convert them to strings. print is not intended for formatted output, but only as a quick way to show a value, typically for debugging. For a formatted output, use string.format.

Description:Sets the metatable for the given table. If setTo is nil, the metatable of the given table is removed. If the original metatable has a "__metatable" field, this will raise an error. This function returns the table t, which was passed to the function.

Description:Attempts to convert the arg into a number with a specified base to interpret the value in. The base may be any integer between 2 and 36, inclusive. In bases above 10, the letter 'A' (in either upper or lower case) represents 10, 'B' represents 11, and so forth, with 'Z' representing 35. In base 10 (the default), the number may have a decimal part, as well as an optional exponent part. In other bases, only unsigned integers are accepted.

Description:Returns the type of its only argument, coded as a string. The possible results of this function are "nil" (a string, not the value nil), "number", "string", "boolean", "table", "function", "thread", and "userdata".

Description:This function is similar to pcall, except that you can set a new error handler.

xpcall calls functionf in protected mode, using err as the error handler. Any error inside f is not propagated; instead, xpcall catches the error, calls the errfunction with the original error object, and returns a status code. Its first result is the status code (a boolean), which is true if the call succeeds without errors. In this case, xpcall also returns all results from the call, after this first result. In case of any error, xpcall returns false plus the result from err.