string to number roblox code example
Example 1: change string to number roblox
local str1 = "123"
local str2 = "Hello"
print(tonumber(str1)) --will return 123
print(tonumber(str2)) --will return nil
Example 2: how to print a string in roblox lua
local string = "" -- strings are enclosed in "" or ''
print(string) -- prints our variable string
print("Hello") -- directly print a string