Alright, so I have a script that spits out a large amount of information to the client, for their stats. The script that fires the client is fine, but the Client script isn't. When it is fired, the print() function to print the stats does not appear. No errors appear. Here is the line from the Server script-

player.Stats.Load:FireClient(player,Shillings,Bank,Income,Rank,Items[1],Stackable[1],Amount[1],Items[2],Stackable[2],Amount[2],Items[3],Stackable[3],Amount[3],Items[4],Stackable[4],Amount[4],Items[5],Stackable[5],Amount[5],Items[6],Stackable[6],Amount[6],Items[7],Stackable[7],Amount[7],Items[8],Stackable[8],Amount[8],Items[9],Stackable[9],Amount[9],Items[10],Stackable[10],Amount[10])

Now, here is the client script, which is a LocalScript.

script:WaitForChild("Load").OnClientEvent:connect(function(player,Shillings,Bank,Income,Rank,Slot1,stack1,amt1,Slot2,stack2,amt2,Slot3,stack3,amt3,Slot4,stack4,amt4,Slot5,stack5,amt5,Slot6,stack6,amt6,Slot7,stack7,amt7,Slot8,stack8,amt8,Slot9,stack9,amt9,Slot10,stack10,amt10)
	Stats["Shillings"] = Shillings
	Stats["Rank"] = Rank
	Stats["Income"] = Income
	Stats["Bank"] = Bank

	for i=1,10 do
		Stats["Slot_"..i]["Name"] = tostring("Slot"..i)
		Stats["Slot_"..i]["Stackable"] = tostring("stack"..i)
		Stats["Slot_"..i]["Amount"] = tostring("amt"..i)
		for i,v in pairs(#Stats) do
		print(v) -- Doesn't print
		end	
	
	
	end
end)

2 comments

0

Wow. That's a lot of arguments... You might wanna consider passing tables or "serialized" tables.

0

Just remove the player variable from .OnClientEvent