i created a script where when a player touch the first part he get introduced into the table
but when he touchs the second part he is supposed to be removed from the table but using table.remove gives me this error in the output : invalid argument #2 to 'remove' (number expected, got string)
PartRouge.Touched:Connect(function(Hit1)
local Player1 = game.Players:GetPlayerFromCharacter(Hit1.Parent)
PartBleu.Touched:Connect(function(Hit2)
local Player2 = game.Players:GetPlayerFromCharacter(Hit2.Parent)
if Player2.Name == Player1.Name then
table.remove(EquipeRougeTable, Player1.Name)
end
end)
end)