How to perfect Shoulder Motor6D on a player

local Width = 1.4 – How wide your shoulders are
local Height = 1 – How tall you are
local Depth = 1 – How fat you are

local MuscleX = 1.2
local MuscleZ = 1

local Vector = Vector3.new(Width, Height, Depth)

if char:GetAttribute(“Scaled”) == true then return end
char:SetAttribute(“Scaled”, true)

	local Humanoid = char.Humanoid
	if Humanoid.RigType == Enum.HumanoidRigType.R6 then
		local Motors = {}
		table.insert(Motors, char.HumanoidRootPart.RootJoint)
		for i,Motor in pairs(char.Torso:GetChildren()) do
			if Motor:IsA("Motor6D") == false then continue end
			table.insert(Motors, Motor)
		end
		for i,v in pairs(Motors) do	
			if v.Name == "Neck" then
				v.C0 = CFrame.new((Vector3.new(0,Height,0))) * (v.C0 - v.C0.Position)
				v.C1 = CFrame.new((Vector3.new(0,-0.5,0))) * (v.C1 - v.C1.Position)
			elseif v.Name == "Left Shoulder" then
				v.C0 = CFrame.new((v.C0.Position * Vector)) * (v.C0 - v.C0.Position)
				v.C1 = CFrame.new((v.C1.Position * Vector)) * (v.C1 - v.C1.Position)
			elseif v.Name == "Right Shoulder" then
				v.C0 = CFrame.new((v.C0.Position * Vector)) * (v.C0 - v.C0.Position)
				v.C1 = CFrame.new((v.C1.Position * Vector)) * (v.C1 - v.C1.Position)
			else
				v.C0 = CFrame.new((v.C0.Position * Vector)) * (v.C0 - v.C0.Position)
				v.C1 = CFrame.new((v.C1.Position * Vector)) * (v.C1 - v.C1.Position)
			end
		end
			
		for i,Part in pairs(char:GetChildren()) do
			if Part:IsA("BasePart") == false or Part.Name == "Head" then continue end
			if Part.Name == "Left Arm" then
				Part.Size *= Vector3.new(MuscleX, Height, MuscleZ)
			elseif Part.Name == "Right Arm" then
				Part.Size *= Vector3.new(MuscleX, Height, MuscleZ)
			else
				Part.Size *= Vector
			end
		end

image

The problem is I tried making calculations to get a perfect Vector[x] but saddly failed. If anyone knows how to fix this gap between the arms please let me know.

1 Like

You could just offset it a little each time you test or copy and paste your character into studio.

yea but when the Width is changed ill need a whole new way to find a perfect fit

1 Like

When the width changes just offset the arms a little. If that doesn’t work and only depends on the width, you have to change up your math a little

never i found a solution with this math equation I made. Thank you for your time tho.