I am creating a NetworkOwnership Module for both the server and the client to use that is inside of replicated storage. The module needs to be able to communicate with the server to set the network owner.
Currently, I am unable to communicate between the two.
I’ve tried using bindable and remote events, nothing has worked so far.
Architecture:
Code for Driver (in ServerScriptService):
local RemoteEvent = game.ReplicatedStorage.Modules.Both.NetworkOwnership.RemoteEvent
local NetworkOwnershipDriver = {}
RemoteEvent.OnServerEvent:Connect(function(object, networkOwner)
warn("fart")
end)
return NetworkOwnershipDriver
Code for Interface (in ReplicatedStorage)
local RemoteEvent = script.RemoteEvent
local NetworkOwnership = {}
NetworkOwnership.SetNetworkOwner = function(object, networkOwner)
print("caught")
RemoteEvent:FireServer(object, networkOwner)
end
return NetworkOwnership