Why is the local script “print(v)” not printing a table?
Server Script
parties = {}
function inviteAccepted (player, playerTheyJoining)
if parties[playerTheyJoining.Name] == nil then
table.insert(parties, playerTheyJoining.Name)
print(repr(parties))
--parties[playerTheyJoining.Name] = {playerTheyJoining.Name}
if parties[playerTheyJoining.Name] ~= nil then
parties[playerTheyJoining.Name] = {parties[playerTheyJoining.Name], player.Name}
else
parties[playerTheyJoining.Name] = {player.Name,playerTheyJoining.Name}
end
print(repr(parties))
updatePartyPlrGui:FireAllClients()
end
end
function getParties()
return parties
end
acceptRemote.OnServerEvent:Connect(inviteAccepted)
getPartiesRemote.OnServerInvoke = getParties
Local Script
function updateList()
local partyTable = game:GetService("ReplicatedStorage").RemoteFunctions.GetParties:InvokeServer()
local val1 = table.unpack(partyTable)
print(val1)
print(partyTable)
for i, v in pairs(partyTable) do
print(v)
if type(v) == "table" then
print(v)
if v[player.Name] then
print('yeyeyeyeyey')
for a, b in pairs(v) do
local newTemp = script.Parent.Parent.InPartyTemplate:Clone()
newTemp.Parent = script.Parent.Parent.PlrsInParty
newTemp.Name = b
newTemp.TextLabel.Text = b
local playerID = game:GetService("Players"):FindFirstChild(b).UserId
newTemp.ImageLabel.Image = game:GetService("Players"):GetUserThumbnailAsync(playerID, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size420x420)
end
end
end
end
end
remote2.OnClientEvent:Connect(updateList)