of     1   

Jammer622
#188711814Saturday, May 07, 2016 6:52 AM GMT

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.
Thane_1
#188712312Saturday, May 07, 2016 7:22 AM GMT

If you try to use a RemoteEvent to get an object from ServerStorage and transfer it to something local, it won't allow you.
OzzyFin
#188712625Saturday, May 07, 2016 7:48 AM GMT

OnServerInvoke is a callback, not an event Table.RemoteFunction.OnServerInvoke = function(plr,...) end I don't see how that could work even without FE
TimeTicks
#188713657Saturday, May 07, 2016 8:44 AM GMT

Depends on what your objective is. I don't think you are going about this correctly.
Jammer622
#188714292Saturday, May 07, 2016 9:15 AM GMT

Alright so first I meant the Server script was supposed to be Table = require(Module) function Table.RemoteFunction.OnServerInvoke() print("Two") end I know that much should work because of the tutorial layout. http://wiki.roblox.com/index.php?title=RemoteFunction_and_RemoteEvent_Tutorial But- let me try to put it in the terms which I'm using it for.. All of this is for my place "Workshop", which currently has FilteringEnabled turned off in order for it to work online until the problem is resolved. It's literally just the current thing I'm working on which is a development gui, where all client elements run off a client script and all server elements run off of a server script. You can see the layout at prnt.sc/b19qi8 My modulescript, Resources, basically just returns a table of variables for quickly referencing all the different UI elements. Dev.Server is the table variable for the remote functions in the server script. Obviously there's more to it, but the rest of the script has nothing to do with the problem. Dev = { Server = { Load = script.Parent:WaitForChild("Server"):WaitForChild("LoadPart"), Delete = script.Parent.Server:WaitForChild("DeletePart"), SaveData = script.Parent.Server:WaitForChild("SaveFileData"), Equip = script.Parent.Server:WaitForChild("EquipPlayerItems"), Dequip = script.Parent.Server:WaitForChild("DequipPlayerItems") } } return Dev This part works fine. The client and server script both successfully load all data from the modulescript. My problem is in these segments of code: [Client] print("Calling RemoteFunction") Dev.Server.Load:InvokeServer() [Server] function Dev.Server.Load.OnServerInvoke(...) print("RemoteFunction Called") end It works completely fine in studio mode, as is expected, and completely fine in online mode as long as FilteringEnabled is turned off. The question comes down to: What's causing it to not work with FilteringEnabled on during online play? If you need more info, I'll give what I can.
OzzyFin
#188720149Saturday, May 07, 2016 12:39 PM GMT

I doubt the server script ever runs because it's in Player(/Starter)Gui where it should not be. Keep your server scripts inside ServerScriptService/workspace depending on the situation. With FE on a server script can't see the inside of a PlayerGui so it shouldn't run there either.
Jammer622
#188754719Saturday, May 07, 2016 10:31 PM GMT

Was the problem really as simple as that? Now that I think about it, that makes perfect sense.. I feel like a goof. Guess I'll be redoing a bit of the script later. Thank you for your help.

    of     1