Learning about module scripts for the first time. I following along what it tells me to do in the official roblox guide for module scripts (https://developer.roblox.com/en-us/api-reference/class/ModuleScript). This is what my code looks like:
SCRIPT 1:
local functions = {}
function functions.test()
print("test")
end
return functions
SCRIPT 2:
wait(3)
local test = require(script.Parent.test)
test.test()
I get: Attempted to call require with invalid argument(s).
Not really sure why this is happening, as I did EXACTLY what it told me to do in the Roblox guide.
A dude four years ago had a similar issue: https://scriptinghelpers.org/questions/24931/attempted-to-call-require-with-invalid-arguments-solved. Unfortunately, once he figured it out, he didn't bother to explain what the solution was. He just said "solved in chat", and "error was in the title". This doesn't help me at all.
I'm sure it's just some dumb mistake I'm making here, I just don't know what. Any assistance is welcomed.

1 comment
are you sure that the module you're requiring is valid?