I’ve been working on a muscle system for a while on my game but struggled with making the individual parts grow with the stats specific to them. I recently found that you can change the Humanoids AutoScaling value to false in order to manipulate the body parts according to the stats but i end up with a squashed body:
Upper Muscle Stat:
Lower Muscle Stat:
I looked into other posts ALOT before making this one, and I saw that changing the position of the Motor6D’s that are attached to the limbs can achieve a desired result, however calculating how much spacing is required has proved extremely difficult as when each respective stat increases it would have to check for the necessary spacing for it to not be squashed. it may seem unrealistic but 2 games of reference, Mighty Omega and gFighting, have been able to implement this feature.
here is the code I have done so far in order to get the Body parts Big:
game.Players.PlayerAdded:Connect(function(plr)
task.wait(1)
local UM = plr:WaitForChild("StatFolder").MainStats.UpperMuscle
local LM = plr:WaitForChild("StatFolder").MainStats.LowerMuscle
repeat task.wait() until UM and LM
local HardUM = 5000
local HardLM = 5000
plr.CharacterAdded:Connect(function(char)
task.wait(5)
local humanoid = char:WaitForChild("Humanoid")
humanoid.AutomaticScalingEnabled = false
--UpperMuscle
local UpperTorso = char.UpperTorso
local LowerTorso = char.LowerTorso
local LeftUpperArm = char.LeftUpperArm
local LeftLowerArm = char.LeftLowerArm
local LeftHand = char.LeftHand
local RightUpperArm = char.RightUpperArm
local RightLowerArm = char.RightLowerArm
local RightHand = char.RightHand
--LowerMuscle
local LeftUpperLeg = char.LeftUpperLeg
local LeftLowerLeg = char.LeftLowerLeg
local LeftFoot = char.LeftFoot
local RightUpperLeg = char.RightUpperLeg
local RightLowerLeg = char.RightLowerLeg
local RightFoot = char.RightFoot
local AddedSizeUM = (UM.Value / HardUM) * 3.75
local AddedSizeLM = (LM.Value / HardUM) * 3.75
RightUpperArm.Size = Vector3.new(RightUpperArm.Size.X + AddedSizeUM, RightUpperArm.Size.Y, RightUpperArm.Size.Z + AddedSizeUM)
RightLowerArm.Size = Vector3.new(RightLowerArm.Size.X + AddedSizeUM, RightLowerArm.Size.Y, RightLowerArm.Size.Z + AddedSizeUM)
RightHand.Size = Vector3.new(RightHand.Size.X + AddedSizeUM, RightHand.Size.Y, RightHand.Size.Z + AddedSizeUM)
LeftUpperArm.Size = Vector3.new(LeftUpperArm.Size.X + AddedSizeUM, LeftUpperArm.Size.Y, LeftUpperArm.Size.Z + AddedSizeUM)
LeftLowerArm.Size = Vector3.new(LeftLowerArm.Size.X + AddedSizeUM, LeftLowerArm.Size.Y, LeftLowerArm.Size.Z + AddedSizeUM)
LeftHand.Size = Vector3.new(LeftHand.Size.X + AddedSizeUM, LeftHand.Size.Y, LeftHand.Size.Z + AddedSizeUM)
UpperTorso.Size = Vector3.new(UpperTorso.Size.X + (AddedSizeUM * 2), UpperTorso.Size.Y, UpperTorso.Size.Z + AddedSizeUM)
LowerTorso.Size = Vector3.new(LowerTorso.Size.X + (AddedSizeUM * 2), LowerTorso.Size.Y, LowerTorso.Size.Z + AddedSizeUM)
RightUpperLeg.Size = Vector3.new(RightUpperLeg.Size.X + AddedSizeLM, RightUpperLeg.Size.Y, RightUpperLeg.Size.Z + AddedSizeLM)
RightLowerLeg.Size = Vector3.new(RightLowerLeg.Size.X + AddedSizeLM, RightLowerLeg.Size.Y, RightLowerLeg.Size.Z + AddedSizeLM)
RightFoot.Size = Vector3.new(RightFoot.Size.X + AddedSizeLM, RightFoot.Size.Y, RightFoot.Size.Z + AddedSizeLM)
LeftUpperLeg.Size = Vector3.new(LeftUpperLeg.Size.X + AddedSizeLM, LeftUpperLeg.Size.Y, LeftUpperLeg.Size.Z + AddedSizeLM)
LeftLowerLeg.Size = Vector3.new(LeftLowerLeg.Size.X + AddedSizeLM, LeftLowerLeg.Size.Y, LeftLowerLeg.Size.Z + AddedSizeLM)
LeftFoot.Size = Vector3.new(LeftFoot.Size.X + AddedSizeLM, LeftFoot.Size.Y, LeftFoot.Size.Z + AddedSizeLM)
end)
end)
Note: Using the BodyDepth and BodyWidth Values already in the humanoid does not give the desired result as all the body parts of the character change