Hi there!
I would like to know if the Client to Server Model serializes values/data being sent between the two entities.
The issue is, I sometimes have unpredicted & unreliable results, do dictionaries get serialized? do metatables get serialized? do tables get serialized? etc.
I’ve tried to print out each value that was returned from a RemoteFunction from the server, some did print out to the Output, however some did not. I’m looking for what the server serializes and how it serializes values before returning them to a client VIA a RemoteFunction.
If you are confused by what I mean, here’s a example for you:
ServerScript inside of ServerScriptService
local remoteFunction = game.ReplicatedStorage.RemoteFunction
local myValue1 = "A string"
local myValue2 = 69
local myValue3 = true
local myValue4 = Enum.KeyCode.E
remoteFunction.OnServerInvoke = function()
return { -- heres an example of a dictionary.
Index1 = "A string"
Index2 = function() end
}, myValue1, myValue2, myValue3, myValue4
-- % return a dictionary as well as a few example values.
end
LocalScript inside of StarterGui
local remoteFunction = game.ReplicatedStorage.RemoteFunction
local dictionary, myValue1, myValue2, myValue3, myValue4 = remoteFunction:InvokeServer()
print(dictionary, myValue1, myValue2, myValue3, myvalue4)
-- /\ /\ I would like to know what that all prints.
Please reply for any clarification, questions, topics, discussion, do not be shy lol.
Thanks.