So I’m trying to find a ModuleScript by using the name arguement given by the function. I am running this ModuleScript function through a ServerScript but it only returns Requested module experienced an error while loading
There’s something I’m probably doing wrong but I’m too new to tables to know what it is.
Any help is appreciated.
module.Confirm = function(name)
local i = require(_L:FindFirstChild(name)) "This is the Error line"
if i then
local id = i.UGC.id
local ugc = mps:GetProductInfo(id, Enum.InfoType.Asset)
end
end
That usually means the module script has an error. Can you show us the code for the module script?
its the only function im running right now. it doesnt connect to any other functions/scripts except for the require function
the ModuleScript is in ReplicatedStorage and the Script running the Function is in ServerScriptServices
The module script being required error’d is what im saying. In my experience that’s the only reason I get the Requested module experienced an error while loading error
There should be a second error above the “Requested Module experienced an error while loading” error, showing the actual error
Just looked at it and saw an error. It said attempt to index nil with 'id'
Forgot to point out I made a ModuleScript storing the data of the items.
module.UGC = {
name = "Prototype",
price = 2,
id = 38748763544521,
}