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

How can i make so that my script stops to run when the size is max?

Asked by 3 years ago

So i am currently making a game that you become bigger each time you click the weight, and i have no size limit because i dont know how to do that. If you could help me to mkae a max size script then thanks!

here is the script (Normal script) :

game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(Character) local Humanoid = Character:FindFirstChild("Humanoid") player.Character.Humanoid.BodyDepthScale.Value = player.leaderstats.strength.Value/10000 + 1 player.Character.Humanoid.BodyHeightScale.Value = player.leaderstats.strength.Value/10000 + 1 player.Character.Humanoid.BodyWidthScale.Value = player.leaderstats.strength.Value/10000 + 1 player.Character.Humanoid.HeadScale.Value = player.leaderstats.strength.Value/10000 + 1 player.leaderstats.strength.Changed:connect(function() player.Character.Humanoid.BodyDepthScale.Value = player.leaderstats.strength.Value/10000 + 1 player.Character.Humanoid.BodyHeightScale.Value = player.leaderstats.strength.Value/10000 + 1 player.Character.Humanoid.BodyWidthScale.Value = player.leaderstats.strength.Value/10000 + 1 player.Character.Humanoid.HeadScale.Value = player.leaderstats.strength.Value/10000 + 1 end) end) end)

1 answer

Log in to vote
1
Answered by 3 years ago
Edited 3 years ago

You can use math.min() and pass in the new size with the size limit. It should return the smallest number, which should be the number you inputted, otherwise the size limit.

0
Where should it be located? I am pretty new scripter. kistagamer3000 10 — 3y
0
I would define it as a variable after finding the Humanoid, then set the values of the scale values to the variable. COUNTYL1MITS 312 — 3y
Ad

Answer this question