Object not following player HumanoidRootPart

I have built and object for my player and the object is welded to the HumanoidRootPart.

Whenever the character moves the object stays floating in the position. Is it because I’ve welded it to the HumanoidRootPart that why its not moving? The object just doesn’t move with the character

I have added a script in ServerScriptService which attaches the object to the HumanoidRootPart:

local Players = game:GetService("Players")

		local PanCase = script.PanCase:Clone()
		PanCase.Parent = Character
		local PanCaseWeldConstraint = Instance.new("WeldConstraint")
		PanCaseWeldConstraint.Part0 = PanCase.PrimaryPart
		PanCaseWeldConstraint.Part1 = Character.PrimaryPart
		PanCaseWeldConstraint.Parent = PanCaseWeldConstraint.Part0

Your character probably doesn’t have a PrimaryPart when you’re calling this. Try doing weldConstraint.Part1 = character:WaitForChild('HumanoidRootPart') instead.

I tried doing your method however, it didn’t seem to work. I probably should’ve mentioned this but the PanCase is stored inside the script and has a PrimaryPart called Main.



Try setting the parent of the PanCaseWeldConstraint before setting its part0 and part1 properties. If still no luck, are there any output errors? If not, check in the properties window and see if the weld’s Part0 and Part1 properties aren’t blank. Also, is the weld’s Active property true?

Sadly there is nothing in the output but, the weld active property is true.

Don’t use WeldConstraints instead, use Welds and set the C0 to the HRP

if you use WeldConstraints it will only move the position one time, instead if you use normal welds and set the C0, it will move all the time along with the player

i worked with welds already and i had this problem too

Okay, are the Part0 and Part1 properties blank in the properties pane?

That isn’t true, weld constraints work fine. They’re physics constraints, they’re supposed to work as expected with physics.

You can’t move CFrame with WeldConstraints

They aren’t looking to move it, they’re looking to move the pan to the character and after moving it, weld it.

He want to move the pan along with the player bud.

He needs to use CFrame for that, not position, and that’s what Welds do, the normal ones

That is exactly what I said. They want to weld it to the character after moving it to the character.

This is what I got in studio:


This is in-game:


The properties in the Main part:


Interesting, the active property of the weld constraint in the first screenshot isn’t active. Is the entire assembly unanchored? If not, try doing that. Also, I suggest switching to :PivotTo instead of using :SetPrimaryPartCFrame.

Is pancase unanchored? It should be.

Ok as i said before, you should use Welds because you need to move the CFrame not the position!!

this is a code example

local Block = game.Workspace.Part

		local HRP = Character.HumanoidRootPart
		local Weld = Instance.new("Weld")
		Weld.Parent = Block
		Block.CFrame = HRP.CFrame
		Weld.Part0 = HRP
		Weld.Part1 = Block
		Weld.C0 = Block.CFrame
		Weld.C1 = HRP.CFrame

this works perfectly fine.

Yes. Everything is unanchored, cancollide is false but Massless = true.

Also, the block is unanchored and CanCollidable, it works without any problems.

I had an error saying: CFrame is not a valid member of Model "PanCase" due to Pancase being the model I want to move instead of staying still.

This was the code:

local Players = game:GetService("Players")

		local HumanoidRootPart = Character.HumanoidRootPart
		local PanCase = script.PanCase:Clone()
		local PanCaseWeld = Instance.new("Weld")
		PanCaseWeld.Parent = PanCase
		PanCase.CFrame = HumanoidRootPart.CFrame
		PanCaseWeld.Part0 = HumanoidRootPart
		PanCaseWeld.Part1 = PanCase
		PanCaseWeld.C0 = PanCase.CFrame
		PanCaseWeld.C1 = HumanoidRootPart.CFrame

you cannot change the cframe of a model.

ok what you can do is make a block and adjust the size of it to be like the pan, change the transparency to 1, weld it with a WeldConstraint to the pan mesh in the explorer, and use that as the pan

and also make sure that the primarypart of the model is that part