You would loop through the table and check if each value is equal to the player that joined.
Example:
game.Players.PlayerAdded:Connect(function(plr)
for i, v in pairs(bronzeMods) do
if v == plr.Name then
print(v.." is a moderator.")
-- anything here will run if the player has been found to be in the table
end
end
end)
You can use table.find() to check the entire table and if result isn’t nil then that means the provided value is in the table:
local bronzeMods = {“SomeStaffOfMine”,“Frepzter”}
game.Players.PlayerAdded:Connect(function(plr)
if table.find(bronzeMods, plr.Name) ~= nil then
print("mod is here")
end
end)
you can just put table.find instead of adding Nil to it. ( both will work )
local bronzeMods = {“SomeStaffOfMine”,“Frepzter”}
game.Players.PlayerAdded:Connect(function(plr)
if table.find(bronzeMods, plr.Name) then
print("mod is here")
end
end)