D
D
DANICH702021-03-09 17:17:18
Unity
DANICH70, 2021-03-09 17:17:18

Errors in the console? Object spawn?

In general, for a long time, together with a friend, they tried to fix the problem, nifiga. Obviously we are doing something wrong. Can you explain please? Here is what the console outputs 6047835611d5a505727987.png60478361a8510483246425.png

private float textimer;
    public float time = 3f;
    public GameObject govno;
    private bool provoda = true;
    public float s;
    public float r;

    s = govno.transform.position = new Vector3(-4.39, 5.83, 90.4); 
    p = govno.transform.position = new Vector3(-1.7, 5.83, 90.4);
    r = govno.transform.position = new Vector3(0.52, 5.83, 90.4);

    float[] array = new float[] { s, p, r }; 
    float res = rand.Next(array.Length);

    float result = array[res]; 

    IEnumerator Da()
    {
        while (provoda==true)
        {
            yield return new WaitForSeconds(3);
            Instantiate(govno);
            govno.transform.position = new Vector3(result); 
        }
    }


    
    void Start()
    {
        StartCoroutine(Da());
    }

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question