Clone CSGBox model from script only

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By kakcalu13

How do you duplicate/clone a model which is from CSGBox? I wanted to clone more than one on an original model. Here is the code what I did:

while not f.eof_reached(): # iterate through all lines until the end of file is reached
	var line = f.get_line()
	if line != "":
		line += " "
		#print(line)
		var CSV_data = line.split(",", true, '0') ##splits into value array per line
		$RigidBody/box.width = int(CSV_data[3])
		$RigidBody/box.depth = int(CSV_data[4])
		$RigidBody/box.height = int(CSV_data[5])
		$RigidBody/box.transform.origin = Vector3(CSV_data[0],CSV_data[1], CSV_data[2])
		duplicated_model.transform.origin = Vector3(0,0,0)
		index += 1
f.close()

This doesn’t work. I don’t think it’d work either. Is there any way for me to make a clone or duplicate without needed to do it in GUI?