In one script I have this code:
_G["chick"] = function() print("chicken") end
And in another script I have this code that activates on tool click:
_G.chick()
But I get this message: attempt to call field 'chick' (a nil value)
Even with the command line I get the same message.
How should I do this? I can tell my code will be terrible if I have to copypaste through every tool.

1 comment
While I have been using server side scripts both times, this seems to work better than the global functions I was planning to use,. Thanks!