Answers for "Call function from other script, part 1"

0

Call function from other script, part 1

_G.myFunction = function() --This means it's a global function.
     print("Hello, myFunction!") --for testing
end
Posted by: Guest on July-05-2021
0

Call function from other script, part 2

repeat wait() until _G.myFunction() --wait until script has loaded, otherwise errors i think
_G.myFunction() --calling the function
Posted by: Guest on July-05-2021

Code answers related to "Call function from other script, part 1"

Browse Popular Code Answers by Language