Second argument is nil in OnClientEvent

I’m using FireAllClient from server and sending two arguments, but in OnClientEvent() I’m receiving just first argument and second argument as nil.

I do have checked the arguments from the server-side and both have a valid value (Boolean, Number).

Here is an example.
Server Side Code: Firing All Clients

	local timer = getServerTimerValue()
	thePlayer:LoadCharacter() -- Built-in function to load character
	remoteEvents.characterSpawned:FireAllClients(thePlayer, timer)

Client-side code: Receiving client event

characterSpawnedEvent.OnClientEvent:Connect(function(localPlayer, serverTimer)
	timer.Value = serverTimer
	if not (localPlayer == playerService.LocalPlayer) then
	local tweenPlayer = tweenService:Create(
		timeContainer,, Enum.EasingStyle.Back, Enum.EasingDirection.Out),
		{Position =,0,0,5), AnchorPoint =,0)}

and I also found the issue.
I was actually sending NumberValue object instance instead of its value and it seems like FireAllClient method doesn’t support this type of data.

remoteEvents.characterSpawned:FireAllClients(thePlayer, timer) - Wrong
remoteEvents.characterSpawned:FireAllClients(thePlayer, timer.Value) - Right

Try this:

remoteEvent.OnClientEvent:Connect(function (serverTuple1,serverTuple2)
print(tostring(serverTuple1) .. " | " ..tostring(serverTuple2) )

remoteEvent.OnClientEvent does not return a table.

Actually, you can pass on a table but it must not be a mixed table.

1 Like

It would be mixed table, because first value is boolean and second is number

When I say a mixed table, I mean this:

local randomTable = {
    a = 2

A normal table is like this:

local randomTable = {
1 Like

If second argument is nil, try fixing this by adding print that will print second argument value (do it on server side). You may see, that the second value is nil before sending it- you may need to fix something in Server Script.

Could you include the server side code so we can get a better idea on what’s going on?

but from what I can see you should be packing the args if you want them to be in table format, assuming you’re firing the event like event:FireAllClients(true, 1)

	local args = {...}
	print(args[1], args[2])
1 Like

I have checked the values from server side before sending it to client and these are fine…

Can you send the event:FireAllClients code on your server, please?

Can you link the fragment of the server code or tell me how does the second value look like?

@Jermartynojm, @itsrenderman,
I’ll update the question when I get to home…

1 Like

The first one is called a dictionary, the second is an array.

The first one is a mixed table, second is an array. There is no dictionary on that.

@Quwanterz @Little_Joes
Second argument is just a number…