Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How can i make it harder to become big when getting more muscle?

Asked by 2 years ago
Edited by imKirda 2 years ago

So i am trying to make a simulator game where you become bigger depending on your muscle, but i cant keep the rate the same everytime becasue then i have to make a limit. I dont want to add a max size because some people are playing for long periods of time and they would still be as big as a not very good player.

Here is the script:

local divide = 1e+15
game.Players.PlayerAdded:connect(function(plr)
    plr.CharacterAdded:connect(function(Character)
        local Humanoid = Character:FindFirstChild("Humanoid") 
        local RATE = 1.5 + plr.Rate.Value--plr.leaderstats["Muscle"].Value/divide + 1.5
        local muscleDv = RATE-- 1.5
        plr.Character.Humanoid.BodyDepthScale.Value = plr.leaderstats["Muscle"].Value/(200+(plr.leaderstats["Muscle"].Value)/muscleDv) + 1
        plr.Character.Humanoid.BodyHeightScale.Value = plr.leaderstats["Muscle"].Value/(200+plr.leaderstats["Muscle"].Value/muscleDv) + 1
        plr.Character.Humanoid.BodyWidthScale.Value = plr.leaderstats["Muscle"].Value/(200+plr.leaderstats["Muscle"].Value/muscleDv) + 1
        plr.Character.Humanoid.HeadScale.Value = plr.leaderstats["Muscle"].Value/(200+plr.leaderstats["Muscle"].Value/muscleDv) + 1
        plr.leaderstats["Muscle"].Changed:connect(function()
            muscleDv = 1.5 + plr.Rate.Value--plr.leaderstats["Muscle"].Value/divide + 1.5
            plr.Character.Humanoid.BodyDepthScale.Value = plr.leaderstats["Muscle"].Value/(200+plr.leaderstats["Muscle"].Value/muscleDv) + 1
            plr.Character.Humanoid.BodyHeightScale.Value = plr.leaderstats["Muscle"].Value/(200+plr.leaderstats["Muscle"].Value/muscleDv) + 1
            plr.Character.Humanoid.BodyWidthScale.Value = plr.leaderstats["Muscle"].Value/(200+plr.leaderstats["Muscle"].Value/muscleDv) + 1
            plr.Character.Humanoid.HeadScale.Value = plr.leaderstats["Muscle"].Value/(200+plr.leaderstats["Muscle"].Value/muscleDv) + 1
    end)
    end)
end)

Answer this question