Code:
local eai = require(game.ServerScriptService.Modulez.Classes.Enemy.EnemyAI)
Output:
15:03:44.987 - Modulez is not a valid member of ServerScriptService
Modulez is a member of ServerScriptService
There could be several solutions..
SOLUTION 1:
It might be that you are trying to access game.ServerScriptService via a Local Script, also called 'client side'. The ServerScriptService is only accessable with server-sided scripts, so you would have to switch over to a normal script, called 'script'.
SOLUTION 2:
Another solution is that you are requiring the module before it even exists.
This is most likely the case if you are using normal scripts.
A simple and clean solution would be adding WaitForChild(). This method waits for the script to exist.
local eai = require(game.ServerScriptService:WaitForChild("Modulez").Classes.Enemy.EnemyAI)
If neither of these work, try to add the module script to a different parent.
Maybe your output gives you some hints during using those solutions.
Good luck!
Are you accessing the module from a local script? You can only access things from server script service from the server. If you need to access the module from a localscript, put it somewhere else.
Serverscriptservice can be only called by module/localscripts, make sure your localscript or modulescript are in workspace or starterpack (place the local or modeulescript into starterpack if the script call game.Players.LocalPlayer)