xxxxxxxxxx
local string = "" -- strings are enclosed in "" or ''
print(string) -- prints our variable string
print("Hello") -- directly print a string
xxxxxxxxxx
-- This script prints out two strings together on one line
local variable = "This is one string"
print(variable .. " and this is another.")
xxxxxxxxxx
-- You can print string
print("Hello, World!")
-- You can print math
print(5 + 5)
-- You can print variables
local i = 5
print(i + 2)
-- You can print number
print(5)
xxxxxxxxxx
local forString = "This is a string with a value of %s."
print(string.format(forString, "Roblox"))
local forInt = "This is an int with a value of %d."
print(string.format(forInt, 5))
local forFloat = "This is a float with a value of %f."
print(string.format(forFloat, 0.5))