hey, weβre getting somewhere
i see that i do not need to handle the rotation as that is already done for me ,
but uh, the sleeves do not start at the shoulders now
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