How can I properly align the clothing sleeves on my viewmodel?

This is a continuation of my previous post,

i’ve decided to go with making models for the player character and the viewmodel

now, for the player character, aligning the position is quite simple, just pivot the clothing to the torso/rootpart

but for the viewmodel, i’m not exactly sure how to do that,
i am using the viewmodels you can find anywhere in the toolbox, they have a fake camera part blah blah blah

now the thing is, if i try to pivot the sleeves to the viewmodel’s primary part, it uhm, it doesn’t really work

this is the only thing i’ve tried so far,
does anyone know how i could get the positions down perfectly?

as far as i know, pivoting the sleeves to the left and right arm respectively would result in the sleeves being on the “forearms”, if that makes sense

open to suggestions

2 Likes

if the sleeves are meshes - add a weldconstraint.

Example
Right Sleeve [Mesh] = Part0
Right Arm [BasePart] = Part1

basically applies the weld at each centre point for each part.

hmmm

i really like your idea,
but i don’t think it quite works

or maybe i just did something incorrectly?

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()
	
	-- creating these variables because idk i find it
	-- a lot more organized
	local leftSleeve = sleeves.Left
	local rightSleeve = sleeves.Right
	
	-- we create the weld constraints :^)
	-- why via a function?
	-- that's a really good question! i don't know!
	local leftWeld: WeldConstraint = CreateWeldConstraint()
	local rightWeld: WeldConstraint = CreateWeldConstraint()
	
	-- we set the welds to the left first
	leftWeld.Part0 = viewmodel:FindFirstChild("Left Arm")
	leftWeld.Part1 = leftSleeve
	
	-- then we do so for the right!
	rightWeld.Part0 = viewmodel:FindFirstChild("Right Arm")
	rightWeld.Part1 = rightSleeve
	
	-- and after all of that, we parent the sleeves to the viewmodel
	sleeves.Parent = viewmodel
end

the result is the same btw

could u show what it looks like when playing with it welded, as well as - if you are making it a mesh make sure u make it CanCollide = false