Scripts stopped working out of nowhere

I was working on one of my projects and out of nowhere, all the scripts in ServerScriptService stopped working at all. Even if I try to print at line 1, nothing prints. Only newly made scripts work. I have tried copy and paste the scripts a few times, but still. Could this be a Roblox Studio bug?

All scripts in ServerScriptService are ServerScripts and are not disabled. Player does join game, but no script executes in ServerScriptService.

Can you explain your issue a little bit more? (pictures would definitely help, or a place file)

Kind of vague.

1 Like

are they local scripts? if so you should turn them into server-scripts

He said that all the scripts in ServerScriptService are ServerScripts.

Hello!

It would be really helpful if you were to provide us with the code you’re struggling with.

Have a great day / night!

Here are my ServerScriptService contents. My main problem is with PlayerHandler:
Screenshot (8)

“Hello World” prints when I play solo on Studio, but then after I try to print it gets stuck somewhere around module requires. I also get this warning in output:

"“Hello world again” does not print. I am guessing the problem is with my modules, but shouldn’t I then get an error if module does not load?

I can confirm that something happens with module loading. When I try to print after all my module requires, nothing happens. For some reason I also get no error message from module or anything. This problem started occurring when I was working on my modules, but I checked through my code and found no problems.

Sorry I couldn’t respond immediately, I was helping someone else.

That warning in output doesn’tt mean anything.

One of your modules may be hanging (e.x. a repeat wait() or while wait() do with no ending whatsoever, halting the thread), so check through the requiring modules and make sure nothing would be halting the thread.
Check for repeats or while loops.

None of the required modules in PlayerHandler have any delay and I don’t think they are hanging. If they were, it would show in output.

I found where my problem is happening, but I don’t know why it’s happening.

Here is a module called Round and it is requiring another module called WeaponModule.

local teamsModule = require(gameFolder.Teams)
local weaponModule = require(gameFolder.Parent.Player.PlayerWeapon) -- At this point the module stops working.
local playerStatsModule = require(gameFolder.Parent.Player.PlayerStats)

Here is the WeaponModule. It also stops working after I require the Round module:

-- Modules --
local playerStatsModule = require(script.Parent.PlayerStats)
local roundModule = require(script.Parent.Parent.Game.Round) -- At this point the module stops working.

Maybe the problem is that they both are requiring each other and for some reason they hang? What’s weird is that I did not change anything in the Round module and only changed a little bit in the WeaponModule before the problem started happening.

I managed to find the problem. Turns out I can’t make it so two modules require each other, since it makes an infinite loop of returning tables.

Here is the post where it explains the problem more in depth.

1 Like