Hey all, I am trying to remove a player’s username from the table when they leave the fightzone, however, I’m not sure how to do this.
local InsideFightZone = {}
FightZone.playerEntered:Connect(function(player)
InZone = true
table.insert(InsideFightZone, player.Name)
end)
FightZone.playerExited:Connect(function(player)
InZone = false
table.remove(InsideFightZone, player.Name) -- Here is where I am struggling
end)
I get the error: invalid argument #2 to ‘remove’ (number expected, got string)