Data types

(Redirected from Data Types)
< Scripting

In Roblox Lua, as well as most programming languages, you will encounter data types. These are the types of values that you can store in variables and used in code. Roblox Lua implements several new data types to Lua in addition to the native data types.

Native Lua[edit]

These are usable in all Lua code - not just Roblox Lua.

Type Description
Boolean Represents either true or false
Coroutine An object that represents a splitting of the normal thread of execution
Function Represents executable Lua code that can be ran with arguments
Nil A state of non-being or nothingness
Number A numerical quantity
Integer A number without a fractional part (for example, -2 or 3, but not 4.5)
String A chain of characters (for example, "hello")
Table A list of key-value pairs
Userdata An interface to the parent application

Roblox Lua Specific[edit]

See the table on the Roblox namespace page.