I'm attempting to pull a table out of a module scripts (I've never touched module scripts before so not even sure if this is possible the way I'm hoping). It's an ignore list that I run very very often in my scripts so I figured it would be a good test to learn these things:
local module = {}
function ignoreUpdate()
local ignoreList = {workspace.Projectiles}
local players = game:GetService("Players"):GetChildren()
for i = 1, #players do
ignoreList[#ignoreList + 1] = players[i].Character
end
return ignoreList
end
return module
I essentially need this ignoreList updated every time right before I cast a new ray. Only problem is I'm clueless on how to actually pull the ignoreList out of it. I've tried quite a few different ways but to no success. This is my most recent attempt at it which is roughly off of what I could find on youtube since the wiki has been almost less than useless.
local module = require(game:GetService("ServerScriptService").UpdatingIgnore)
local ignoreList = module.ignoreUpdate()
However, when printing ignoreList it has always been nil. So I'm officially back to square one on this one.

3 comments
In your module's current state, it is impossible to. the ignorelist is neither accessibly directly via the module script(its not a part of the module), or via the ignoreUpdates function(the function doesnt return the table)
So in other words move the function between the module brackets and have it return the ignoreList?
Also, I did actually have it return the ignoreList under the ignoreUpdates. Sorry. I had to rewrite it. Let me update the question with that part.