I have recently made a map voting script but I get an error saying "attempt to concatenate nil with string". Here is where the error is:
if string.match(v.Name, "Votes") then
print(mapName)
v.SurfaceGui.TextLabel.Text = mapName.." - ".. votes
end
I assume it is from mapName because whenever it is printed it prints as nil, the mapName variable is a table. Here is where the table is inserted:
function module.MapVoting(dur)
mapVotes = {}
for i,v in pairs(game.Workspace.Lobby.Voting:GetChildren()) do
table.insert(mapVotes, {order = tonumber(v.Name:match("%u+")); name = getMap(); players = {}})
if v.Name:match("%u+") then
print("s")
end
Please help me I don't know how to fix this.

2 comments
Please show the line where mapName is created, it doesn't show enough info.
all it says is local mapVotes = {}