I have recently saw some fancy functions and want to try them out! I usually use those basic functions that everyone else uses. Could someone explain what everything does?
What I do
local function Hello(Message) print(Message) end
What I see
function main:GetRandomSound(SoundTable : {}) : string return SoundTable[math.random(#SoundTable)] end
they are virtually the same, the second one just looks more complex because by the looks of it it is using returning and tables (which aren't complex)
local functions are local (meaning they use scope)
global functions (or functions without the local prefix DO NOT USE SCOPE)
for more information on scope see the link bellow:
https://developer.roblox.com/en-us/articles/Scope