public void partySelection() { if (!toggle.isOn) { List <Playable> newParty = new List <Playable>(); foreach (Playable p in party.partyMembers) { if (p.GetInstanceID() != player.GetInstanceID()) { newParty.Add(p); } } party.partyMembers.Clear(); foreach (Playable p in newParty) { party.addMember(p); } } else { if (party.partyMembers.Count == 3) { return; } foreach (Playable p in party.partyMembers) { if (p.GetInstanceID() == player.GetInstanceID()) { return; } } party.addMember(player); } }