I have written a few ModuleScripts (classes and helper stuff) and for a normal script to work, i require said modules at the beginning of the script, like this:
local Modules = game:GetService("ServerScriptService"):WaitForChild("Modules")
local Generator = require(Modules.Game.Generator)
local Map = require(Modules.Game.Map)
After which i have a function that makes use of the Map module. The code works and runs perfectly well, but after a few seconds i still get the warning: Infinite yield possible on 'ServerScriptService:WaitForChild("Modules")'.
Is there any way to get rid of this warning? Any ideas what could be causing it?
Code is probably seeing a case where Modules does not exist in the ServerScriptService. Are you replicating it into the ServerScriptService as a parent through another script?