i didnt find an answer on the devforum.
sorry if the question is confusing, let me break it down.
i have a module for making part hitboxes
i have another module that requires this module and executes its function
i want to make it so that if i pass an argument to the hitbox module from that second module, to run that code in the first module, because i want to make it so that it runs when the hitbox touches a player
if that was still confusing, read this: module 1 - hitboxes, module 2 - ability ; in module 2, when running the function of module 1, pass a function as an argument ; in module 1, when the hitbox hits something, if the argument that is supposed to be a function exists, run it.
my questions: 1. is this possible, because i cant figure out how to do it inside the script ; 2. can somebody help me if it is possible
Its possible to create tables of functions and run them. That table that contains functions in a module can be accessed and run yes.
But, it just makes me think about the approach of your system, which perhaps idk, could not be optimal. Could you elaborate what mechanics you want to achieve?
Probably its not needed to send a function to the second module to run it. Or probably Im misunderstanding what you meant