Model Not Being Cloned into Workspace

So im having a problem where i am trying to clone a model then make its parent the workspace but when i do, instead of moving the model, it moves what’s inside the model. I have tried to fix this by setting Archivable to true but the error persists. This is the code i used:

local generator = game.Workspace.Maps.Map1:GetChildren()
local fruits = game.ReplicatedStorage.Fruits:GetChildren()
local map = game.Workspace.Maps.Map1
local fruitsfolder = game.ReplicatedStorage.Fruits

while true do
	local genchoice = math.random(1, 3)
	local chosenfruit = math.random(1, 3)
	print(chosenfruit)
	print(genchoice)
	if genchoice == 1 then
	
	if chosenfruit == 1 then
		
			local clone1 = fruitsfolder.Banana:Clone() 
			clone1.Parent = game.Workspace
			clone1.sphere.CFrame = map.Log1.sphere.CFrame
			
	elseif chosenfruit == 2 then
		
			local clone2 = fruitsfolder.Orange:Clone() 
			clone2.Parent = game.Workspace
			clone2.sphere.CFrame = map.Log1.sphere.CFrame
			
	elseif chosenfruit == 3 then
		
			local clone3 = fruitsfolder.Apple:Clone() 
			clone3.Parent = game.Workspace
			clone3.sphere.CFrame = map.Log1.sphere.CFrame
			
	end
	
	end

	if genchoice == 2 then

	if chosenfruit == 1 then

			local clone4 = fruitsfolder.Banana:Clone() 
			clone4.Parent = game.Workspace
			clone4.sphere.CFrame = map.Log2.sphere.CFrame
			
	elseif chosenfruit == 2 then

			local clone4 = fruitsfolder.Orange:Clone() 
			clone4.Parent = game.Workspace
			clone4.sphere.CFrame = map.Log2.sphere.CFrame

	elseif chosenfruit == 3 then

			local clone4 = fruitsfolder.Apple:Clone() 
			clone4.Parent = game.Workspace
			clone4.sphere.CFrame = map.Log2.sphere.CFrame

	end

	end

	if genchoice == 3 then

		if chosenfruit == 1 then

				local clone7 = fruitsfolder.Banana:Clone() 
				clone7.Parent = game.Workspace
				clone7.sphere.CFrame = map.Log3.sphere.CFrame
				
		elseif chosenfruit == 2 then
			
				local clone8 = fruitsfolder.Orange:Clone() 
				clone8.Parent = game.Workspace
				clone8.sphere.CFrame = map.Log3.sphere.CFrame
				
				
		elseif chosenfruit == 3 then

				local clone9 = fruitsfolder.Apple:Clone() 
				clone9.Parent = game.Workspace
				clone9.sphere.CFrame = map.Log3.sphere.CFrame
				
				
		end

	end
	wait(1)
end	
	

Its meant to choose one of three logs set up and spawn a random fruit there and the fruits mentioned (Banana, Orange and Apple) are models. This is a screenshot of what appears
image
And this is a screenshot of the ReplicatedStorage
image

1 Like

Try using :PivotTo() instead of .cframe in models so just replace clone.sphere.CFrame = map.Log1.sphere.CFrame with clone:PivotTo(map.Log1.sphere.CFrame)

I tried this but the issue persists but could i also ask what :PivotTo() does

:PivotTo() basically set’s the primary parts cframe to a certain while following welds and connectors

So if it’s not working make sure everything is welded together with a weld constraint