// Table Interactions (along with pushing the torpedo into the hatch)
    void TableInteraction(GameObject player)
    {
        canInteract = true;

        // Try to load a torpedo IF (1) table has a torpedo on it, (2) the hatch is open
        Hatch hatch = GameObject.FindGameObjectWithTag("PressurizedTubeSlider").GetComponent <Hatch>();

        if (GameObject.Find("Table").GetComponent <Table>().isLoaded&& !hatch.isHatchClosed && !hatch.isTubeFilled)
        {
            hatch.DetectTable();

            // If a player is in the killZone, kill the player.
            List <GameObject> deadPlayers = GameObject.Find("Tube").GetComponent <Tube>().KillZone(true);
            if (deadPlayers != null && deadPlayers.Count > 0)
            {
                foreach (var p in deadPlayers)
                {
                    PlayerScript ps = p.GetComponent <PlayerScript>();

                    // Set player fixed joint, animator's holding bool to false, and respawn.
                    p.GetComponent <FixedJoint2D>().enabled = false;
                    p.GetComponent <Animator>().SetBool("holding", false);
                    ps.RespawnPlayer();
                }
            }
        }

        // If both players are holding the table and one player interacts with it.
        if (p1Holding && p2Holding)
        {
            if (player == GameObject.Find("Player_1"))
            {
                p1Holding = false;
            }
            if (player == GameObject.Find("Player_2"))
            {
                p2Holding = false;
            }
            transform.GetComponent <Rigidbody2D>().mass  = 20;
            transform.GetComponent <Rigidbody2D>().drag  = 100000;
            player.GetComponent <FixedJoint2D>().enabled = false;

            // Make the player's animator it's no longer holding on to the table.
            player.GetComponent <Animator>().SetBool("holding", false);
        }

        // If one player is holding onto the table and the other isnt.
        else if (p1Holding && !p2Holding)
        {
            if (player == GameObject.Find("Player_1"))
            {
                p1Holding = false;
                player.GetComponent <FixedJoint2D>().enabled    = false;
                transform.GetComponent <Rigidbody2D>().bodyType = RigidbodyType2D.Static;

                player.GetComponent <Animator>().SetBool("holding", false);
            }
            if (player == GameObject.Find("Player_2"))
            {
                p2Holding = true;
                player.GetComponent <FixedJoint2D>().connectedBody = rb;
                player.GetComponent <FixedJoint2D>().enabled       = true;
                transform.GetComponent <Rigidbody2D>().bodyType    = RigidbodyType2D.Dynamic;
                transform.GetComponent <Rigidbody2D>().mass        = 1;
                transform.GetComponent <Rigidbody2D>().drag        = 0;

                // Make the player's animator realize it's holding on to the table.
                player.GetComponent <Animator>().SetBool("holding", true);
            }
        }
        else if (!p1Holding && p2Holding)
        {
            if (player == GameObject.Find("Player_1"))
            {
                p1Holding = true;
                player.GetComponent <FixedJoint2D>().connectedBody = rb;
                player.GetComponent <FixedJoint2D>().enabled       = true;
                transform.GetComponent <Rigidbody2D>().mass        = 1;
                transform.GetComponent <Rigidbody2D>().drag        = 0;

                // Make the player's animator realize it's holding on to the table.
                player.GetComponent <Animator>().SetBool("holding", true);
            }
            if (player == GameObject.Find("Player_2"))
            {
                p2Holding = false;
                player.GetComponent <FixedJoint2D>().enabled    = false;
                transform.GetComponent <Rigidbody2D>().bodyType = RigidbodyType2D.Static;

                player.GetComponent <Animator>().SetBool("holding", false);
            }
        }
        //when no one is holding onto the table.
        else
        {
            if (player == GameObject.Find("Player_1"))
            {
                p1Holding = true;
            }
            if (player == GameObject.Find("Player_2"))
            {
                p2Holding = true;
            }

            player.GetComponent <FixedJoint2D>().connectedBody = rb;
            player.GetComponent <FixedJoint2D>().enabled       = true;
            transform.GetComponent <Rigidbody2D>().bodyType    = RigidbodyType2D.Dynamic;
            transform.GetComponent <Rigidbody2D>().mass        = 20;
            transform.GetComponent <Rigidbody2D>().drag        = 100000;

            player.GetComponent <Animator>().SetBool("holding", true);
        }
    }