local tupleArg = http:JSONEncode(...)
I want to get the arguments from my FireServer Function without manually placing the arguments (checking multiple events to see if one was fired), but it always prints null, how can I accomplish getting the arguments for the certain event?
Note: This is all inside of an OnServerEvent function
You can place arguments in the Event:FireServer(). When you are writing up your OnServerEvent function, be aware that the player that fired the server is listed before your arguments. Event.OnServerEvent(plr, arguments)
.
So lets say you want to transmit the letter x from the client to the server for your encode.
--This is from the client. local var = "x" game.ReplicatedStorage.RemoteEvent:FireServer(var)
Now for the server.
--This is from the server. game.ReplicatedStorage.RemoteEvent.OnServerEvent(function(player, var) print(var) --Output: "x" end)
Hope this answered what you were looking for.