Используя библиотеку Unity измени код таким образом, чтобы при условии the.tag == "Gun" корректно отображался объект currentModule в случае выполнения функций Left и Right:using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.InputSystem;

public class Craft : MonoBehaviour
{
    [SerializeField] private List<Point> points_in = new List<Point>();
    [SerializeField] private List<Point> point_used = new List<Point>();
    [SerializeField] private List<Point> not_used = new List<Point>();
    [SerializeField] private List<Point> not_used_upward = new List<Point>();
    [SerializeField] private Material defaultMaterial;
    [SerializeField] private Material transparentMaterial;
    [SerializeField] private Collider the;
    [SerializeField] private GameObject currentModule;
    [SerializeField] private Point save_in_point;
    [SerializeField] private Point save_out_point;
    [SerializeField] private Attack attack;
    public int i,g;
    public int index;

    void Start()
    {
        index=0;
        not_used.Add(transform.GetChild(index).GetComponent<Point>());
    }

    public void Right()
    {
        if (i+1 < index)
        {
            i++;
            GameObject[] current = GameObject.FindGameObjectsWithTag("Connection");
            if (current.Length != 0)
            {
                foreach (GameObject module in current)
                {
                   Destroy(module); 
                }
            }
            PlaceModule(points_in, the);
        }
    }
    public void Left()
    {
        if (i > 0)
        {
            i--;
            GameObject[] current = GameObject.FindGameObjectsWithTag("Connection");
            if (current.Length != 0)
            {
                foreach (GameObject module in current)
                {
                   Destroy(module); 
                }
            }
            PlaceModule(points_in, the);
        }
    }
    public void OnTriggerEnter (Collider other)
    {
        for (int i = 0; i < other.transform.childCount; i++)
        {
            if (other.transform.GetChild(i).GetComponent<Point>() != null)
            {
                points_in.Add(other.transform.GetChild(i).GetComponent<Point>());
                defaultMaterial = other.transform.GetComponent<Renderer>().material;
                the = other;
            }
        }
        g=0;
        for (int i = 0; i < not_used.Count; i++)
        {
            if (not_used[i].point == Point_pos.Upward && not_used[i].transform.parent.tag != "Gun")
            {
                not_used_upward.Add(not_used[i]);
                defaultMaterial = other.transform.GetComponent<Renderer>().material;
                the = other;
                g++;
                index = g;
            }
        }
        PlaceModule(points_in, other);
    }
    private void PlaceModule(List <Point> module, Collider other)
    {
        foreach (Point point_out in module)
        {
            switch (point_out.point)
            {
                case (Point_pos.Up):
                if (not_used[i].point == Point_pos.Down)
                {
                    index = not_used.Count;
                    HandlePointOut(other, not_used[i], point_out);
                }
                continue;
                case (Point_pos.Down):
                if (not_used[i].point == Point_pos.Up)
                {
                    index = not_used.Count;
                    HandlePointOut(other, not_used[i], point_out);
                }
                continue;
                case (Point_pos.Left):
                if (not_used[i].point == Point_pos.Right)
                {
                    index = not_used.Count;
                    HandlePointOut(other, not_used[i], point_out);
                }
                continue;
                case (Point_pos.Right):
                if (not_used[i].point == Point_pos.Left)
                {
                    index = not_used.Count;
                    HandlePointOut(other, not_used[i], point_out);
                }
                continue;
                case (Point_pos.Upward):
                if (the.tag == "Gun")
                {
                    HandlePointOut(other, not_used_upward[i], point_out);
                }
                continue;
                default:
                point_out.use = Module.Not_Used;
                break;
            }
        }
    }
    public void OnTriggerExit(Collider other)
    {
        for (int i = 0; i < other.transform.childCount; i++)
        {
            Point point = other.transform.GetChild(i).GetComponent<Point>();
            if (point != null)
            {
                points_in.Remove(point);
                point.use = Module.Not_Used;
            }
        }
        Destroy(currentModule);
    }
    private void Delete(Collider other)
    {
        for (int i = 0; i < other.transform.childCount; i++)
        {
            Point point = other.transform.GetChild(i).GetComponent<Point>();
            if (point != null)
            {
                points_in.Remove(point); 
            }
        }
    }
    private void Contain(Collider other)
    {
        for (int i = 0; i < other.transform.childCount; i++)
        {
            if (other.transform.GetChild(i).GetComponent<Point>() != null)
            {
                not_used.Add(other.transform.GetChild(i).GetComponent<Point>());
            }
        }
    }
    private void HandlePointOut(Collider other, Point point_use, Point point_out)
    {
        currentModule = Instantiate(other.gameObject);
        currentModule.name = other.name;
        currentModule.tag = "Connection";
        currentModule.transform.parent = point_use.transform;
        currentModule.transform.position = point_use.transform.position;
        currentModule.transform.rotation = point_use.transform.rotation;
        currentModule.transform.GetComponent<Renderer>().material = transparentMaterial;
        save_in_point = point_use;
        save_out_point = point_out;
    }
    public void Create()
    {
        GameObject[] current = GameObject.FindGameObjectsWithTag("Connection");
            if (current.Length != 0)
            {
                foreach (GameObject module in current)
                {
                   Destroy(module); 
                }
                the.transform.parent = save_in_point.transform;
                the.transform.position = save_in_point.transform.position;
                the.transform.rotation = save_in_point.transform.rotation;
                save_in_point.use = Module.Used;
                save_out_point.use = Module.Used;
                point_used.Add(save_out_point);
                if (point_used[i] != save_in_point)
                {
                    point_used.Add(save_in_point);
                }
                not_used.Remove(save_in_point);
                Contain(the);
                not_used.Remove(save_out_point);
                Delete(the);
            }
            else
            {
                attack.Fire();
            }
    }
}