#When it's good to use method and when to use local function or function

1 messages · Page 1 of 1 (latest)

frigid knoll
#

I got problem in module script:
Where use private method when you got use local function,
what is the differenct between local function and function is it just because local function is faster, and
when to use method and when to use function

calm hatch
#

Conclusion: use local to define a variable or a function

frigid knoll
#

?

steel lilyBOT
#

studio** You are now Level 2! **studio

calm hatch
frigid knoll
frozen storm
#

local functions are only useable in that scope though

#

keep it in mind

#

but prob dont nest functions

#

just for cleaniness

calm hatch
#

It clearly tells you the pros of using local instead of global

frigid knoll
#

i want to know when to use local function and when to use private method.

calm hatch
#

CONCLUSION: always use local.