I have a FilteringEnabled place, so of course, RemoteEvents are going to be in play here.
For some reason, though, it's not detecting a function I'm sending to the server.
[Client-Side Code]
Event:FireServer("Sound", function()
Handle[Position]:Play()
end)
[Server-Side Code]
--Event connection and arguments and stuff are up here, the first argument when fired is Type and the second is arg1
elseif Type == "Sound" then
local success, message = pcall(function()
print(arg1) --This prints "nil"
arg1()
end)
AlertServer(success, message) --For error reporting
In the server, I'm constantly getting this: ServerScriptService.ServerGunHandler:61 attempt to call upvalue 'arg1' (a nil value)
Can functions not be replicated over RemoteEvents?
EDIT
I found this on the wiki under limitations for RemoteEvents:
An instance that's only visible to the sender (local parts, descendants from the ServerScriptService, ...) will be replaced with nil.
Would the function being sent technically only be visible to the sender?

1 comment
You can't give a function as an argument to Event:FireServer(). What is the thing you're actualy trieng to do here?