Weldconstraint stops working when Part1 is unanchored?

hey, we’re getting somewhere

i see that i do not need to handle the rotation as that is already done for me :grin: ,

but uh, the sleeves do not start at the shoulders now :slightly_frowning_face:

local function ClothesToViewmodel(viewmodel: Model)
	local activeShirt = char:FindFirstChildOfClass("Shirt")
	
	if not activeShirt then return end
	
	-- we're cloning the sleeves right here, duh!
	local sleeves = viewmodelSleevesFolder.BaseShirt:Clone()
	
	sleeves.Parent = viewmodel
	sleeves.Name = "Sleeves"
	
	-- creating these variables because idk i find it
	-- a lot more organized
	local leftSleeve = sleeves.Left
	local rightSleeve = sleeves.Right
	
	-- the viewmodel arms
	local leftArm: BasePart = viewmodel:FindFirstChild("Left Arm")
	local rightArm: BasePart = viewmodel:FindFirstChild("Right Arm")
	
	-- we create the weld constraints :^)
	-- why via a function?
	-- that's a really good question! i don't know!
	local leftWeld: Weld = CreateWeldConstraint()
	local rightWeld: Weld = CreateWeldConstraint()
	
	-- we create the body positions...
	-- which are deprecated?!?!?!
	local leftBodyPosition: BodyPosition = CreateBodyPosition()
	local rightBodyPosition: BodyPosition = CreateBodyPosition()
	
	-- parent the body positions
	leftBodyPosition.Parent = leftSleeve
	rightBodyPosition.Parent = rightSleeve
	
	-- change the sleeve positions
	leftSleeve.Position = leftArm.Position
	rightSleeve.Position = rightArm.Position
	
	-- then change the body positions positions
	-- that sounds really weird
	leftBodyPosition.Position = leftSleeve.Position
	rightBodyPosition.Position = rightSleeve.Position
	
	-- parent the welds!
	leftWeld.Parent = leftArm
	rightWeld.Parent = rightArm
	
	-- we set the welds to the left first
	leftWeld.Part0 = leftArm
	leftWeld.Part1 = leftSleeve
	
	-- then we do so for the right!
	rightWeld.Part0 = rightArm
	rightWeld.Part1 = rightSleeve
end

move it on the z vector i think backwards so when the sleeve position is on the arm position just do - vector3.new(0, 0, 2) i think

also for bodypos u shouldnt need weld if its added to sleeve or arm

strange, i need welds because otherwise the same issue as before happens

but other than that, it works!

thanks :^)

1 Like