How do I Insert things into a module my script w?on't work and there are no outputs
--ServerScript in workspace
local Mod = require(game.ServerStorage.Give)
game.Players.PlayerAdded:Connect(function(plr)
--Uses Module
Mod.Give(plr)
end)
--Module in ServerStorage name : Give
local module = {}
-- Gives the data
function module.Give(Player)
local returnModule = require(game.ServerStorage.Hell)
local TableModule = require(game.ServerStorage.ModuleScript)
local TableToReturn = returnModule.Data(Player)
table.insert(TableModule,TableToReturn)
end
--Module in ServerStorage name : Hell
local module = {}
--Returns Data Table
function module.Data(Player)
local tab = {Player.UserId, Player.Name}
return tab
end
return module
--Module in ServerStorage name : ModuleScript
local module = {}
-- This is supposed to store everything
return module