I made a set of plugins that all use an utility module. I get the module by id:
local util = require(id)
While this works fine in studio edit mode, when you test the game, you get an error:
require(assetId) cannot be called from a client.
To work around this, I just made it so code for the plugin doesnt run if RunService:IsClient()
. Of course that means that none of my plugins work on the client when testing, but they do on the server.
How could I work around this so it works on both the client and server?