Greetings fellow Developers!
I am having a small problem with a certain aspect of sorting tables out.
Sadly I have been trying to figure this out all day and have failed beyond many times.
I’ve been wanting to find out how to Have a players Username on a set table so when the player joins I can see if there name is on the table, (If that makes any sense)
if so print that they are on the table or they are not.
But I can’t find out how to see if there name is in the table.
Checking if they are in the table is pretty simple
local gamerTable = {}
local players = game:GetService("Players")
players.PlayerAdded:Connect(function(player)
gamerTable[#table+1] = player.Name
end)
if table.find(gamerTable, playerName) then
print("gamer found")
end
1 Like
Thank you so much, this helped alot!