using System.Collections;
using System.Collections.Generic;
using SystemUnityEngine;
public class Reset : MonoBehavior
{
public GameObject Cubes;
public Vector3 originalPos;
void Start()
{
originalPos = Cubes.transform.position;
}
public void reset() // Here i want to delete the old Cubes and Spawn them
// at the originalPos again so that they are an the same Pos as in the start
{
Destroy(Cubes);
Thread.Sleep(300);
//I've tried
//GameObject spawnedCubes = Instantiate(Cubes, originalPos);
// spawnedCubes.GetComponent<Rigidbody>();
}
}
I have changed the code now to this
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Reset : MonoBehaviour
{
public GameObject CubesPre;
public Vector3 originalPos;
public Quaternion originalRot;
void Start()
{
originalPos = CubesPre.transform.position;
originalRot = CubesPre.transform.rotation;
}
public void reset()
{
Destroy(CubesPre);
System.Threading.Thread.Sleep(500);
Instantiate(CubesPre, originalPos, originalRot);
}
but if i Instaniate my CubesPre the Cubes which are in my CubesPre dont change their position as they are assigned in the CubesPre so if my Cubes are out of order 
i use public void reset() and the should move back to this 
But they just stay out of order any ideas?