lets say i wanna make an admin script
local usernames = {
"YouthfulPat501",
"Roblox,
"Builderman
}
game.Players.PlayerAdded:connect(function(player)
player.CharacterAdded:Connect(function(character)
if player.Name == usernames[1] then
print("eligible for admin")
end
end)
end)
if i write
if player.Name == usernames[1] then
it will only check if the player’s username is the first index in the table
how do i automate this and make it check through all the indexes from the table so i wouldn’t have to write
if player.Name == usernames[1] or player.Name == usernames[2] and so on