xxxxxxxxxx
-- You can do either
local hello = "Hello World!"
-- Or
print("whatever you want to put in the output")
xxxxxxxxxx
function myFunction() -- Start with 'function', give it a name
-- Do something amazing
end -- Finish with 'end'
myFunction() -- Call the function later in the code
xxxxxxxxxx
--// Basic Function
function PrintingText()
print("My text here")
end
PrintingText()
xxxxxxxxxx
local function GoodFunction() --Replace GoodFunction With Your Function Name
--Your Script Here
end
GoodFunction() --Replace GoodFunction Wiht Your Function Name
xxxxxxxxxx
function MyFunction()
print('Function fired')
end)
if true == true then
MyFunction() --firing the function.
end