Does anyone know why this is happening? I have a table that updates player values across all places. I changed it to UserId instead of Name because this way if someone changes their name it, their data will be the same. This table is for an admin system which gives them a rank.
The code:
function updateRank(Player, givenRank)
DataStore:UpdateAsync(Key, function(rank)
rank[Player.UserId] = givenRank
end)
end
Help will be greatly appreciated!

6 comments
I'm pretty sure you can't set a function's parameters to another value other than the one passed in, although I haven't tested it.
It worked with Player.Name
Use player.Name, as that value is unique like the user id, you can't change it and no two players can have the same name.
I know that but it is for an admin system and if they were to change their name it would screw it up
Oh yeah and rank is a table
Also it is saved on the server and not in individuals