Module return Multiple Values

I tried returning multiple things with my module, but I get this error:

Module:

local blacklistedIds = {}
local whitelistedIds = {}



--
local placeID = game.PlaceId
local PlaceInfo = game:GetService("MarketplaceService"):GetProductInfo(placeID)
if PlaceInfo.Creator.CreatorType == "Group" then 
    GameOwner = game:GetService("GroupService"):GetGroupInfoAsync(PlaceInfo.Creator.CreatorTargetId).Owner.Name
    local IdOfOwner = game.Players:GetUserIdFromNameAsync(GameOwner)
    GameOwner = IdOfOwner
else 
    GameOwner = game.CreatorId
end

for i, v in pairs(blacklistedIds) do
	if GameOwner == v then
		print('[EZ-Tech API] - You are blacklisted from using our products.')
		game.Workspace.Part:Destroy()
	end
end



return whitelistedIds,blacklistedIds
1 Like

This is your issue.

Your module needs to return exactly one value. No more, no less. To circumvent this you can return them in one table.

return { whitelistedIds, blacklistedIds }
6 Likes

Yeah, but many people get confused with it. (Includes me as well.)