How can I send information from server to module?

Im making a trading system and I’m using a module script to get the players data to ofcourse show it and allow it to be traded and stuff. However, the players data is only on the server and can only be accessed from that one script, how can I send that data to the module script when I have to?
Heres what the module script looks like, it currently uses tools but I wanna change that to the players data:

local config = {}


-------Settings you can change-------
config.MaxSlots = 9
config.TimeBeforeTradeConfirmed = 10
-------------------------------------


--Funcion for getting all the tools a player has
function config.GetTools(plr)
	
	local plrTools = plr.Backpack:GetChildren()

	local toolEquipped = plr.Character:FindFirstChildOfClass("Tool")
	if toolEquipped then
		table.insert(plrTools, toolEquipped)
	end

	return plrTools
end

return config

For reference, the data on the server script looks like this:

local data = {}
local function loadData(player)
	local success = nil
	local playerData = nil
	local attempt = 1

	repeat
		success, playerData = pcall(function()
			return dataBase:GetAsync(player.UserId)
		end)

		attempt += 1
		if not success then
			warn(playerData)
			task.wait()
		end
	until success or attempt == 3

	if success then
		if not playerData then--give default data if they're new
			playerData = {
				["Gems"] = 0,
				["SelectedTowers"] = {"Cameraguy"},
				["OwnedTowers"] = {"Cameraguy"},
				["MaxTowers"] = 5,
				["RedeemedCodes"] = {}
			}
			beamEvent:FireClient(player)
		end
		
		data[player.UserId] = playerData

If you could help asap that would be appreciated because i gtg soon and i wanna get this done quickly lol, have a great day!

1 Like

I’m struggling to understand your post sorry, could you elaborate any further?
Are you trying to send data from the server to the client or vice versa?

Im trying to send data from the server to a module script in ReplicatedStorage which will be used by both the server and client.

Shouldn’t you use remote events???

You’re better off sending data between the client and server using remote events.
Each client will see their own version of the ModuleScript without any changes replicating to the server.

I guess you could use bindable events.