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!
function updateRank(Player, givenRank) DataStore:UpdateAsync(Key, rank) rank[Player.UserId] = givenRank end end
try this, this should work i think