Super weird. Out of curiosity, can you try adding this line of code to the FIRST line of your getPlayerNameFromUserId function?:
userId = tostring(userId)
I’m curious to see if that fixes this issue, based on the text in parentheses in the error message about keys needing to be strings. I’m not home right now so can’t test this for myself, sorry.