Im trying to require a module but i get this error. can someone help me pls
local Packages = game:GetService("ReplicatedStorage").Packages;
local Net = require(Packages.BridgeNet2);
local ClientCommunication = Net.ReferenceBridge("ClientCommunication");
local player = game.Players.LocalPlayer;
-- kwargs sent from the server:
type ValidationArguments = {
Request: string; -- Module;
Action: string; -- function to call;
Scope: Player | string; -- Player
Arguments: {
any: any -- all args.
}
}
local Inventory = require(script.Inventory)
local Gacha = require(script.Gacha);
local Quests = require(script.Quests);
ClientCommunication:Connect(function(Dictionary : ValidationArguments)
if Dictionary.Scope == "All" then
local module = require(script:WaitForChild(Dictionary.Request))
module[Dictionary.Action](Dictionary.Arguments);
elseif Dictionary.Scope == "Player" then
if Dictionary.Arguments.Player == player then
local module = require(script:WaitForChild(Dictionary.Request))
module[Dictionary.Action](Dictionary.Arguments);
end
end
end)
the code above is in the “Client” local script, and the module im trynna require is a child of said local script.
