Help with calling module scripts with a server script

Hello. I have a server script that runs when clicking a part, and it worked fine. However, I recently tried to add a line where it defines a module script and it breaks the entire thing. Basically wherever I put the line of code that requires the module, anything after that no longer functions; almost as if there was a return there. Nothing appears in the output. Everything in the module script is server-sided. Any help?

Line if it’s necessary:

local frenzmod = require(game.ReplicatedStorage.FrenzyModScript)

If I put a print before and after it, it will print the first one but not the second. i.e,

print("This is the first print...") -- This one prints.
local frenzmod = require(game.ReplicatedStorage.FrenzyModScript)
print("This is the second print...") -- This one does not.

Do you have any yields in this module script? Can you try debugging with prints before and after the require?

give full script or more context

How do you expect anybody to understand where is the problem without providing anything?

If I put a print() before the require it prints, however if I put a print() after the require it does not print.

The main script that this is on is very big and basically is the ‘main’ script for the game so I didn’t want to paste all of it, plus it’s still a bit sloppy. But from what I can see nothing about the script would stop the ‘require’ to work or something.

The context I already gave was definitely not enough, my bad. Basically wherever I put the line of code that requires the module, anything after that no longer functions; almost as if there was a return there. That’s basically the entire context. (I edited the og post so that it includes this now)

most likely yields like the guy mentioned, or errors, infinite loops. try adding debug prints inside the module and see what happens

yeah I found it by debug prints in the module script itself, turns out it was from a definition of

local plr = Players.PlayerAdded:Wait()

that was causing it. Thanks for the advice and thanks to everyone else who replied.