How to rig a model for moveTo?

Hey I have this function which rigs my models however when I try to use “MoveTo” On it, the model isnt moving. I have confirmed the model is unanchored except for the body\

local function rigModel(petModel)
	
--[[
  * Goal: Rig plain model using function for proper pathfinding.
  * Actions: Create humanoid root part, humanoid, and weld it all.
--]]

 -- HumanoidRootPart Creation
	local humanoidRootPart = Instance.new("Part")
	humanoidRootPart.Parent = petModel
	humanoidRootPart.Name = "HumanoidRootPart"
	humanoidRootPart.Size = Vector3.new(5,5,5)
	humanoidRootPart.Transparency = 0.9
	humanoidRootPart.Position = petModel:GetPivot().Position
	humanoidRootPart.Anchored = false
	petModel.PrimaryPart = humanoidRootPart
	

  -- Weld everything
	for i,v in pairs(petModel:GetChildren()) do
		if v:IsA("BasePart") then
			local weld = Instance.new("WeldConstraint")
			weld.Parent = v
			weld.Part0 = petModel.Body
			weld.Part1 = v
			v.Anchored = false
		end
	end
	
-- Humanoid Creation
	local humanoid = Instance.new("Humanoid")
	humanoid.Parent = petModel
	
-- So that it stays intact
	petModel.Body.Anchored = true
end
2 Likes

Wrong category this should be in #help-and-feedback

1 Like

bruh I really did that :man_facepalming:
My bad bro

1 Like

i have no idea i’m a composer, a music maker, i have no clue about scripting.

i was just letting you know you are vulnerable to Preston’s wrath.