Say I have this script...
local Passes = {["DjDoor"] = 4846905 }
How would I be able to to get the name "DjDoor" if I had the ID 4846905? Would I have to make ["DjDoor"] an array and add another string like this...?
local Passes = {["DjDoor"] = {4846905, "DjDoor"} }
Or is there another way to obtain it?
Just use a key-value for loop:
for key, value in pairs(Passes) do if value == 4846905 then print(key, value) -- You can access both end end