✓ Accepted answer
You see, you're are comparing a string to a table, which does not work.
A table is like a list of strings, numbers, values, or variables.
example = {"I", "Like", "The Numbers", 5, 10, 15}
You want to compare the string or "playerName" to a value in the table, to do this you will need a loop. More specifically, a for loop. A for loop will go through all the values of the table or after a specified number of steps, and stop at the end.
So, for your script, you want to have the below code;
for _,v in pairs(admins) do
if playerName == v then
script.Parent.Visible = true
end
end
Really, you do not need the while loop, that will only add lag to your game (might not be noticeable). Just put the script I provided above into lines 5-11 and you should have a working script.
1 comment
THANK YOU! >:D