Concatenation

From ROBLOX Wiki

Jump to: navigation, search

Strings can be joined together using the concatenation operator "..". e.g.,

print("hello" .. " Lua user")
Will result in:
hello Lua user

and

who = "Lua user"
print("hello "..who)
Will result in:
hello Lua user


Numbers can be concatenated to strings. In this case they are coerced into strings and then concatenated. print("Green bottles: "..10)
Will result in:
Green bottles: 10

and

print(type("Green bottles: "..10))
Will result in:
string

See Also

Concatenation