Module script inaccessible from local script located in player files

  1. I am trying to create a Trello accessible whitelist for specific users to have access to an in-game spawner. I have been successful in requiring the script from a server script, however not on the local script.

  2. My issue is that the local script shown below is unable to require the module script. It does not show any infinite yield or error messages within the output. It also does not print module loaded, or any other messages located in the script which are not shown below.

  3. I’ve tried creating multiple module scripts and editing the new module scripts so that they match the demands of the local script, this was done just in case the module script could not output to two different scripts. Besides that I’ve tried reorganizing folders and files into different areas but so far nothing has worked. Does anyone have any idea on why this may be happening?

Local script below which is located in the playergui which gets relocated to the player. it stops loading past the point of the whitelist module.

local replicatedStorage = game:GetService('ReplicatedStorage')
local userInputService = game:GetService('UserInputService')
local player = game.Players.LocalPlayer
local items = {}

local WhitelistModule = require(game.ReplicatedStorage:WaitForChild("WhitelistVerification"))
print("module loaded")

Whitelist Script below which a serverscript(first return, unlisted) and the local script(second return, above) use. This script seems to be working perfectly fine as I have proven that all the correct data that I require gets outputted into the return.

local TrelloAPI = require(game.ServerScriptService:WaitForChild("Modules"):WaitForChild("TrelloAPIWhitelist"))
local BoardID = TrelloAPI:GetBoardID("Spawner Permission Board")
local Tier1List = TrelloAPI:GetListID("Tier 1",BoardID)
local Tier2List = TrelloAPI:GetListID("Tier 2",BoardID)
local Tier3List = TrelloAPI:GetListID("Tier 3",BoardID)
local Tier4List = TrelloAPI:GetListID("Tier 4",BoardID)

local Tiers = {
	Tier1List,
	Tier2List,
	Tier3List,
	Tier4List
}

local tiersWithIds = {
	["Tier 1"] = {},
	["Tier 2"] = {},
	["Tier 3"] = {},
	["Tier 4"] = {}
}

local verifiedUsers = {}

for i,v in pairs(Tiers) do
	for b,card in pairs(TrelloAPI:GetCardsInList(v)) do
		local numberCovert = tonumber(card.desc)
		table.insert(tiersWithIds["Tier "..tostring(i)], numberCovert)
	end
end


for i,v in pairs(Tiers) do
	for i,card in pairs(TrelloAPI:GetCardsInList(v)) do
		local numberCovert = tonumber(card.desc)
		table.insert(verifiedUsers, numberCovert)
	end
end


return {verifiedUsers,tiersWithIds}

Try running the same require from the server and see what happens.

There is another server script which I have not listed, but it works within that script.

If this code in the module is being handled on the client it cannot be accessed because it is in server script service.

What do you mean, is it cause the Trello api that the module im requiring uses is in server script storage? Because the module itself is located in rs.

Yes. If a module depends on another module that uses wait for child it will wait for it. Move the other module into replicated storage and try that.

1 Like

Thank you, although moving the module may not be an option because it contains sensitive keys, I’ll try to find a workaround.

Try using RSA: Rivest–Shamir–Adleman (RSA) cryptosystem in Luau - #12 by SubtotalAnt8185

I’m not sure how you would implement it though.

1 Like