SERVER
... local playerspets = a:getTable() print(#playerspets) -- This prints the correct length of the table drawinv:FireClient(player, playerspets) end
LOCALSCRIPT
... draw.OnClientEvent:Connect(function(playerpets) print(#playerpets) -- This prints 0 aka the incorrect length
Maybe i'm missing something but I've been stuck on this for a while. If anyone could help me out that would be greatly appreciated, thanks!
if you want to print the length then just fire the value of the length, not the whole table, like this:
Server:
... local playerspets = a:getTable() drawinv:FireClient(player, #playerspets) end
Client:
... draw.OnClientEvent:Connect(function(playerpets) print(playerpets)
Hope this helped