Module Script can't use other Module Scripts' functions, is this intended?

Is this expected behaviour? Not being able to use other module functions inside other modules?

Should I just merge the modules?

I assume you forgot to require the other ModuleScript that contains “loadEffects”, so you essentially just did “Module.loadEffects” instead of “require(Module).loadEffects”

That being said, you didn’t provide the code, so the only real thing I can do is guess what went wrong.

1 Like

I did require it

inside
module caller:

local testLib = ReplicatedStorage:WaitForChild("testLibrary")
print(testLib)

function callerLib.start()
      testLib.loadEffects(var)
end

other module:

function testLib.loadEffects(var)
     function here
end

it returns loadeffects is not a valid member of modulescript

You didn’t. You have to call require on the testLib module and return it as a variable or atleast using it’s return result.

2 Likes

Hi, Innovolt

This is my first post on the Roblox developer forum so bare with me if i make any mistakes!
I’m pretty sure that Module Scripts are only used to create functions and not execute them. As for your question im guessing you cannot import other functions from other scripts but rather you have to copy paste them. Afterwards you can call the functions from a regular script or a LocalScript. Please Mark this as a solution is this helps! Thanks!

1 Like

Wait I’m blind I duplicated the module and was editing the wrong one

How do you delete this topic