"Argument 1 missing or nil"

Hi! I’m making an OverHead-Gui but for some reason it errors with the following errormessage:
Argument 1 missing or nil.
Line 45 function and Line 116.

Line45 function:

local function returnGroupRankFromGroupName(player, groupName)
			return tostring(player:GetRoleInGroup(TeamIdTable[groupName]))

Line116 Code

			overHeadGuiClone.TextLabel.Text = plr.Name .. ", " .. tostring(plrRank) .. "|\n" .. table.concat(teamsThatThePlayerIsIn, ", ") .. " - " .. returnGroupRankFromGroupName(plr, teamsThatThePlayerIsIn[1])

Thank you!

Are you providing a group id in the “groupName” argument?

No, a groupShortName basically.

This issue should be fixed though, I reverted this script to the last point where it worked, just trying to modify it.