i need to insert player name, and some number value in his leaderboard into table script, how to i do this?
how i need (example):
local players = {
qcrimson_7 = 15,
golden_darkside = 61,
quagmire1 = 0
}
i need to insert player name, and some number value in his leaderboard into table script, how to i do this?
how i need (example):
local players = {
qcrimson_7 = 15,
golden_darkside = 61,
quagmire1 = 0
}
Something along the lines of:
players[player.Name] = number
to set a index with a value in a dictionary you simply index the value and assign it
local players = {
person1 = 5,
person_2 = 16
}
players["person3"] = 0
players.person_4 = 66
local person5 = "person5"
players[person5] = 12
-- // if the value has special characters you need to use square brackets
players["david.baszucki"] = 10
players["username with space"] = 0
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.