Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why can't my module script be required?

Asked by 4 years ago
Edited 4 years ago

Another one of my module scripts is being required by a local script using the following code:

local DefaultFunctions = require(game:GetService("ReplicatedStorage"):WaitForChild("DefaultFunctions"))

And, despite previous advice when I posted a similar question before (link is here), the code I wrote to require the module is yielding my code yet again. The odd thing is, despite the code yielding the script, it doesn't output any warning message about the code yielding indefinitely (I traced this problem with print()). I'm seriously stumped and have no idea what's wrong this time.

0
I just test the code you have rn and it works perfectly try inserting a new module script and require it (insert something like module = {print("works")}). but the problem seem to be more about the whole script not working at all (specially the no warning part) GGRBXLuaGG 417 — 4y
0
Yeah, I made some new scripts to test those parts of the scripts specifically and they work perfectly, so it must be something wrong with the other code. But then again, I just can't seem to find the problem... ServerLover38 21 — 4y
0
Hi, trie to write require(game.ReplicatedStorage.DefaultFunctions) Eternalove_fan32 188 — 4y
0
I tested the module script to see whether everything was running fine, and there were no errors. I double checked the local script, and I can definitely say that it's something wrong with this line of code that requires this module script. Could this be some bug? ServerLover38 21 — 4y
View all comments (4 more)
0
Eternalove, tried your suggestion, but it still doesn't do anything :/ ServerLover38 21 — 4y
0
Can I edit the game? It would be nice to see the issue first hand and try to debug it. royaltoe 5144 — 4y
0
lucyy how do I let you do that?? ServerLover38 21 — 4y
0
Okay, so... after a few tests, I've kinda figured it out. All of the code in my module script can only be successfully required by normal scripts only, and not local scripts, and so the local script is causing this bug. ServerLover38 21 — 4y

Answer this question