Hello! I made a Weld Constraint for a Mesh Part that welds it to its parent. The parent is moved to the players head and welded to it as well, but this mesh part is not moving with the parent! Part0 is set to the mesh part and Part1 is the mesh parts parent, and the weld is under the mesh part, so I don’t know why it isn’t working! Incase you need any extra info, both parts under Part1 and Part0 is not anchored and both are mesh parts. I have another part that is welded to the same mesh part that the other one is welding to and it moves just fine! Any help will be appreciated.
Send your code
–min characters
There isn’t any code whatsoever, the weld is made in studio.
Unless you meant the moving of the parent meshpart, then here:
newheadthing.CFrame = hitCharTwo:FindFirstChild("Head").CFrame
newheadthing.Orientation = newheadthing.Orientation + Vector3.new(0,-90,0)
newheadthing.Blood.Orientation = newheadthing.Blood.Orientation + Vector3.new(0,-90,0)
newheadthing.Flesh.Orientation = newheadthing.Flesh.Orientation + Vector3.new(0,-90,0)
local Weld = Instance.new("WeldConstraint")
Weld.Parent = newheadthing
Weld.Part1 = hitCharTwo:FindFirstChild("Head")
Weld.Part0 = newheadthing
Weld.Enabled = true
Pretty sure you need to switch part0 and part1 in this code
If this is a Model
:
newheadthing:PivotTo(newheadthing:GetPivot() * CFrame.Angles(0, -math.pi/2, 0))
-- :PivotTo() moves the entire model using CFrames
-- :GetPivot() gets the models current CFrame
-- math.pi/2 is how you write 90 degress in radians
-- for a more managable alternative: use math.rad() for easy conversions
You are applying Welds incorrectly here, Part0
is the object that will hold the weld. and Part1
is the object that is being welded onto the object.
Another way is to check what’s welded to what object, as another object may be welded to the object, which can prevent movement.
Same thing happens, the part still won’t move from its original position.
Might be because it’s anchored. Try unanchoring part1
newheadthing is a Mesh Part with stuff under it, one of which is the part this isn’t moving with the part it is welded to. And I do not think I am applying the weld incorrectly as when i create a weld, it makes Part1 the object I am welding the selected object to. Though when changing the script the way you said, it still does not work.
As stated, both part1 and part0 are not anchored.
I switched over from WeldConstraint to Motor6D, and that seemed to do the trick. Still have no clue why the WeldConstraint didn’t work.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.