When I try to require a ModuleScript from a folder in ServerScriptService, it gives me the following error: Modules is not a valid member of ServerScriptService
"Modules" is the name of the folder and i'm trying to access it using the following code in a local script in StarterGui:
local eai = require(game.ServerScriptService.Modules.Classes.Enemy.EnemyAi)
Please forgive me if this is a very simple solution, it has been a very long time since i last programmed on ROBLOX and I have forgotten quite an amount of stuff
Thanks
Put the modules
in ReplicatedStorage
The Client can't see ServerScriptService, hence why Server is in the name. You are getting the error because to the Client the Module doesn't exist.
You must move the Module into a place where the Client can see it, for example ReplicatedStorage.
You can then access the Module via a LocalScript as the Client can now see it.