Im attempting to call a module script from a few other script but I keep getting the error in the image below
I’ve checked both the script calling the module and the module script itself but there doesn’t seem to be any errors nor is there anything in output outlining any errors there would be, API service and HTTP requests are enabled.
local TM = require(StarterPack:WaitForChild("ToolManagment"))
I cannot send the modulescript itself as it is far too long, just know there is no errors inside of it.
If you are sure there are no errors in the module itself, most likely the path is wrong or nil. (“ToolManagment” or “ToolManagement”?)
waitForChild behaves like an event so won’t fire if the module has already loaded, I would try optionally defining it such as:
local TM = require( StarterPack:FindFirstChild("ToolManagment") or StarterPack:WaitForChild("ToolManagment"))
Just also thought, anything in the StarterPack is copied into the player’s backpack when the character loads, so the path will change when the script actually runs.
Use pcall for that part of the module or a specific function in order to detect what is causing it. I will only give example usage since you can’t post script fully here.
Example:
local s,e = pcall(function()
-- Insert code here
end)
if not s or e then
warn("error in module: "..tostring(e).." | "..debug.traceback()) -- will print out any errors inside pcall
end