So I want to make it so a player gets placed into a table after touching a part, but when I make it like that, the code says it ran over 600 times. So I figured I should just ignore them if they're in a table, how would I do that? When I tried the game crashed... I've tried already, and here's what I've tried.
if hit.Parent:FindFirstChild("Humanoid") then
hit.Parent.HumanoidRootPart.CFrame = game.Workspace.TpCframe2.CFrame
local player = game.Players:GetPlayerFromCharacter(hit)
if player.Name ~= #plrs then
table.insert(plrs,player)
print("Added player to plrs table.")
end
end

2 comments
oh wait, so I dont use player.Name?
You may use the name or player, indexes do not have a set preference.