Limitations conerning modulescripts and replication

So basically, on the serverside, for make it short I’m requiring some module on the server, and I’m passing that module on the client via a RemoteEvent. The client is able to see everything in the module in question except a function. Here’s how the module looks like

local patterns = require(script.Parent.Parent:WaitForChild("Dependencies"):WaitForChild("Patterns"))

local shadow = {
	powers = {
		[1] = {
			name = "Dark Erruption",
			keyCode = Enum.KeyCode.E,
			use = function()
				print("interesting...")
			end
		}
	}
}

return shadow

now the funny thing is that the client doesn’t seem to be able to see that specific function within the module in question as you can see below
image

  1. is it normal?
  2. in order to fix that what do you guys suggest.

You cannot send functions over because they do not serialize. I think you should instead have the module accessible to the client so it can use the functions.

Hmmm. Putting the module on the Client would imply that the client can see the code and the same goes on for the exploiters. I’ll try to work with that, thanks.

It shouldn’t matter. Exploiters are already able to decompile local scripts so letting them see a module script should be no different. Just remember to not trust the client

1 Like