Model:MoveTo() not working

Hey devs! I’m trying to move and entire model to a specific part’s position and the MoveTo() thing is just completely not working I even tried changing it just to a certain Vector3 point like shown below but it still wont work if anyone can help that would be great thanks!

– Trieing to move model to specific part position

while wait(5) do
-- Ignore this for now
	if script.Parent == game.Workspace then
		local pos = Vector3.new(0, 0, 0)
		for i, v in pairs(game.Workspace:GetChildren()) do
			if v.Name == script.Parent:WaitForChild("Owner").Value.. "Taken" then
				local pos = v.Position
			end
		end
		script.Parent:MoveTo(game.Workspace:FindFirstChild(script.Parent:WaitForChild("Owner").Value.. "Taken").Position)	
	end
end

– Trieing to move model just to vector3

while wait(5) do
	if script.Parent == game.Workspace then
		local pos = Vector3.new(0, 0, 0)
		for i, v in pairs(game.Workspace:GetChildren()) do
			if v.Name == script.Parent:WaitForChild("Owner").Value.. "Taken" then
				local pos = v.Position
			end
		end
		script.Parent:MoveTo(Vector3.new(0, 0, 0))	
	end
end

Like I said none of these worked so any help is appreciated!
(Note the model is duplicated out of replicated storage and is than supposed to move itself somewhere after being duplicated)

“If script.Parent == workspace”
“script.Parent:MoveTo” ?
You’re not even attempting to move a model?

1 Like

According to the docs, :MoveTo only moves the PrimaryPart. However, :SetPrimaryPartCFrame moves the PrimaryPart as well as the rest of the model. Set a PrimaryPart and use this instead. (You will have to change .Position to .CFrame)

1 Like

Omg… I didn’t even notice that :smile: thank you so much lol.

Another solution by the other person

Actually after figuring testing out what the other person said MoveTo() also does move the entire model but I haven’t ever tried SetPrimaryPartCFrame yet