Ok, I am just gonna go sleep with the thinking of making a Signal API.
How ever, I would like to be able to smartly disconnect functions from scripts that were deleted.
(Even if this ends up not being necessary, it’s still something I wanna learn for other reasons)
Basically I would like to know how to get the script “variable”, from a given function. Let’s say a script gives a function as an argument, I wanna use that to determine what script that was called from, however, I don’t know how to do that.
I think you can do that with getfenv()? I’m not sure. I would like some help from some “professional” scripters out here.
Hm, I was gonna say it probably doesn’t “disable them” but nvm, It looks like it does.
That’s kind of sad. I think it might not be a problem since I’m only getting the env from the submitted function, and most people use local variables anyway, but stuff like the math, table, string, libraries I guess can cause problems.
I feel like there should be a function to allow getting a script object from a function at this point