I'm having trouble in one of my... longer scripts.
Basically I've got three scripts: One client, one server, and one module, all inside of a standalone gui in startergui, so it replicates playergui when a player's character spawns. A remotefunction is inside of the server script. This is just an example of the problem I've isolated, so of course the table has a single variable.
Module has contents
Table = {RemoteFunction = script.Parent.Server.RemoteFunction}
return Table
Server has function
Table = require(Module)
Table.RemoteFunction.OnServerInvoke:connect(function()
print("Two")
end)
Client has events
Table = require(Module)
print("One")
Table.RemoteFunction:InvokeServer()
print("Three")
The problem is that, with filteringenabled off, everything works fine, but with filteringenabled on, Server never prints Two. Is there something I'm missing? I thought remotefunctions and remoteevents were designed to let scripts communicate when filteringenabled is on. |