-
What do you want to achieve? Keep it simple and clear!
So i need to get this module
from this one module
-
What is the issue? Include screenshots / videos if possible!
issue what i get this error
-
What solutions have you tried so far? Did you look for solutions on the Developer Hub? I had looked though few posts but i didn’t really understand how to fix this
Hey,
Could you please post the code that errored for you (e.g., from the module script, server script or likewise)?
local PlayerManager = require(game:GetService("ServerScriptService").PlayerManager)
Apart from that, in short, make sure that you are not requiring a module which has that same module required. For example, requiring A in B and then also B in A, that would cause recursion.
With a single line of code, I cannot help you much apart from that.
The problem is that the PlayerManager
module is require
ing the module with this code.
No it’s not, playerManager not require this module, it requires
this module, but not commands
I saw that posts few times, i can’t really understand how to fix this recursion there. Because i’m not requiring A in B there
Ok, but what modules does Console
require
? And what modules do those modules require
? Eventually, somewhere along the line it will try to require
PlayerManager
, which causes the error because then it will try to require
Console
and so on, looping forever.
Try using Ctrl+Shift+F
to find all require
s, that could help speed things up.
PlayerManager require console
Console require commands
Commands require PlayerManager
Console require Commands, Commands require PlayerManager, PlayerManager require Console.
Console -> Commands -> PlayerManager -> Console -> Commands -> ...
You need to change something.
I’ve done PlayerManager require inside of a function where it needs to use in Commands. Will this fix that?
EDIT: Seems to work
If it works then please close the thread.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.