I want the muscles to gradually change, getting closer to the best possible physique. But I can’t figure out how to get the position to slowly change with it since I’m using a StartingPhysique and a MaxPhysique to be reference points on progress. Instead the muscle moves by like .1 studs to the side regardless of how much i increase the strength
local char = script.Parent
local plr = GetPlayerFromCharacter(char)
local MuscleFunctions = require(game.ReplicatedStorage.MuscleFunctions)
local MaxPhysique = game.ServerStorage.MaxPhysique
local StarterPhysique = game.ServerStorage.StarterPhysique
local SizeCurveMultiplier = script:GetAttribute('SizeCurveMultiplier')
local MaxMuscleMass = script:GetAttribute('MaxMuscleMass')
function IncreaseStrength(musclePart, change) -- lets say max muscle is 10000
local MMPart = MuscleFunctions.Find_Muscle_fromModel(MaxPhysique,musclePart)
local SMPart = MuscleFunctions.Find_Muscle_fromModel(StarterPhysique,musclePart)
local muscle = MuscleFunctions.Find_Muscle_fromFolder(plr,musclePart)
muscle.Value += change
local progress = math.min(muscle.Value/MaxMuscleMass,1)
local newSize = SMPart.Size + (MMPart.Size - SMPart.Size) * progress
musclePart.Size = newSize
local newPosition = musclePart.Position + (MMPart.Position - SMPart.Position) * progress
musclePart.Position = newPosition -- Here is the issue
end
while true do
IncreaseStrength(char.Upperbody.Pecs.LeftPec, 5000)
IncreaseStrength(char.Upperbody.Pecs.RightPec, 5000)
wait(2)
end