local admins = {'Player1', 'Player2'} for _, v in ipairs(admins) do print(_, admins) if player.Name == v then adminButton.Visible = true else break end end
When it prints, it prints some random letters and number in the output. I'm trying to go through the lists of admins, but it only seems to work for whoever is first in the table.
It prints random numbers because you are printing the "underscore" variable. "underscore" in your script is given the position of 'v' in the table 'admins'.
Also, your script only works for the first person in the table because you stop the loop using 'break' if player.Name is not equal to v (that is, the first value in the table: "Player1").