Module script cant find a folder in ServerScriptService when requiring another module?

  1. What do you want to achieve?
    All I need is for the module script to be able to require() another module script successfully

  2. What is the issue?
    When getting the module an error pops up:

  3. What solutions have you tried so far?
    I’ve thoroughly checked for spelling errors but none were found.

The code:

print(game:GetService("ServerScriptService"):GetChildren())
local dataManager = require(game:GetService("ServerScriptService").PlayerData.Manager)

ServerScriptService:
image

Full Output:

It looks like you’re trying to require the Manager module from the PlayerData folder in ServerScriptService. However, based on the error message you provided, it seems that the Manager module either doesn’t exist or is not properly located in the PlayerData folder.

To fix this issue, you should double-check that the Manager module exists in the correct folder and that the module script is named correctly (i.e. “Manager”). You should also make sure that there are no typos in the folder or module names.

Assuming that the Manager module exists in the PlayerData folder, you should be able to require it using the following code:

local dataManager = require(game:GetService("ServerScriptService").PlayerData.Manager)

If the issue persists, you can try printing out the contents of the ServerScriptService and PlayerData folders to verify that the module is located in the correct folder.

1 Like

The ServerScriptService basically is something that will keep certain things deep down inside of your game. For example, it is good to do this just incase of exploiters ruining the game. Some exploiters wouldn’t be able to dig deep down into those files, including the ones in ServerScriptService or ServerStorage. If you have your modulescript inside of SSS, then it should work fine. Otherwise, if your modulescript that is trying to require another module is outside of SSS, then it wouldn’t be possible for your modulescript to require something from SSS.

Edit: Where is your script placed in?

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.