local mapVotes = {}
local playerVotes = {}
for i, map in pairs(game.ReplicatedStorage.VotedMap:GetChildren()) do
table.insert(mapVotes, map.Value)
end
for i, choice in pairs(game.ReplicatedStorage.VotedPlayers:GetChildren()) do
table.insert(playerVotes, choice.Value)
end
table.sort(mapVotes)
table.sort(playerVotes)
print(mapVotes)
print(playerVotes)
So I've tried to troubleshoot this and I think there's an issue with the for loops. Any ideas?

2 comments
It is, you're just not presenting the arrays properly. Use: "print(unpack(array))"
Still not working. It only prints 0, even though the values in repstorage changed.