Hello, I am trying to put values name and it's actual value into a table but it's not working as i had expected i print's only value but not the name of the value what am i doing wrong?
local MapVotes = {}
for i,v in pairs(game.ReplicatedStorage.Assets.Values.MapVotes:GetChildren()) do
MapVotes[v.Name] = v.Value
end
print(MapVotes.Map1)

3 comments
You already know what the key is since you are printing out the value of it?
well yeah but the script will need to find it itself i was here just testing. What i want to do right now is table.sort it and print the Map with biggest Value how would i do that?
By table.sort i mean't table.sort the whole table so i know the highest value but i need to find the highest value's Name.. that's what i am stuck on