Requested module experienced an error while loading

That picture I had was a picture from the ModuleScript.

Here is the code for the GameManager module:

local GameManager = {}

local Config = require(script.Parent.Configurations)
local mapsManager = require(script.MapsManager)
local timeManager = require(script.TimeManager)
local displayManager = require(script.DisplaysManager)

--vars
local intermission = false
local enoughPlayers = false
local gameRunning = false

function GameManager:Initialize()
	mapsManager:SaveMaps()
end

function GameManager:RunVotingIntermission()
	intermission = true
end

function GameManager:GameStart()
	gameRunning = true
end

return GameManager

1 Like

Do you know if the error is occurring in a different module? It appears to be DisplaysManager that is an issue.

2 Likes

I fixed that one, so now it is only the GameManager.

There doesn’t seem to be any issues here. Do you know what line the error occurs on?

1 Like

Match this picture with the code:
Screen Shot 2020-04-14 at 10.33.05 AM

local gameRunning = false

function GameManager:Initialize()
	mapsManager:SaveMaps()
end

In other words, it is on lines 11-13.

You should be able to mouse over the line and it will tell you what the issue is.

1 Like

Here:

Are you using the Beta Luau type checker by chance? I found a similar error code thrown on a post there.

EDIT: Try change Initialize to Init and see if that fixes it.

4 Likes

I don’t get it. It still says Initialize even though I set it to

function GameManager:Init()

end
1 Like

That’s a weird issue. I would try restarting studio. Also, are you using the Beta Luau type checker?

I’m using every single Beta Feature, so I don’t know.

Restarting studio didn’t help.

1 Like

Yeah, that explains why. Try disabling the Luau type checker as a beta feature and see if that works for you.

1 Like

Wait…
It works now. I have no idea what just happened, but it suddenly worked.

I didn’t even disable Luau.

16 Likes

Do you know how it is fixed? Because for mine it just become error, last time it work and now it become a error.

5 Likes

When requiring a module, I Believe using :WaitForChild() is ideal as you may be attempting to require something that hasn’t fully loaded into the game.

Well, I did that but its still has the same error.

1 Like

Weirdly enough, sometimes it seems as though its a roblox issue with their servers, hence why it randomly started working for you again. I don’t know why roblox does this, but I often times find myself having the same problem.

2 Likes

This is happening to me still but Luau type checker isnt a beta feature any more and im still getting errors. I have all beta features enabled.

Ive even disabled every beta feature but still to no avail

Hello guys I just had the same error. It seems like the error is caused by a module script, requiring a modulescript that requires the same modulescript as itself.

Even docs states it here:
“A run time error is generated if this doesn’t happen. If a ModuleScript is attempting to require another ModuleScript that in turn tries to require it, the thread will hang and never halt (cyclic require calls do not generate errors). Be mindful of your module dependencies in large projects!”

1 Like