Cannot require a non-RobloxScript module from a RobloxScript

Heya!

  1. What do you want to achieve?
    I want to share and run functions between different VMs
  2. What is the issue?
    I’m running a script on RobloxScript context (even higher than PluginScript) with a ModuleScript required by CoreScripts, but when I try to require a different ModuleScript I get this error:
- Cannot require a non-RobloxScript module from a RobloxScript -
  1. What solutions have you tried so far?
    I know that the issue is because ModuleScript’s cache is stored on one Virtual Machine and Roblox doesn’t share it between VMs (CoreScripts and normal scripts run on a different VM), I have already tried sharing it through cloned modules (same error), bindable functions and Actor messaging, still doesn’t work. I fully get it if it’s not possible to achieve this feature.
  2. What would fix this problem?
    If it’s possible to convert Non-RobloxScript modules to RobloxScript modules, or if it’s possible to just share functions between VMs. I’d also be happy for solutions that might include something like grabbing the function’s string/bytecode and send that to run in the CoreScript but I think that’s a bit too much for me : P.

This is my first post ever, thanks for reading :slight_smile:

Also I’ve seen a few questions about this on the devforum before but the answer was always that you can’t really do anything about it…
If you need more information please ask, I don’t mind sharing the project.