I am trying to print "Player" and "PreyStar" from the table below but Idk how to. Thanks for the help!
Admins = {['Player'] = true, ['PreyStar'] = true} print(Admins[1].Name)
local Admins = {['Player'] = true, ['PreyStar'] = true} --a table of admins for i, v in pairs(Admins) do --cycle through all values in the table, where i = index and v = value. print(i) --print the index, or name of the player. end
Note this is not recommended if you are trying to make an admin script, as people can change usernames. it's better to use the player's id over their username. You can find the id, as it is a property of the player.
local id = game.Players.Player.userId