Growth Script (Strength)

Hi,

I’m making a lifting simulator game, and I’ve been trying to make a growth script.
What happens is when the player reaches a certain amount of strength, their character will grow to that value. The current player DeptScale value is 0.4. Here is the script to set the size to something different. (This script is regular Script in Starter Gui)


local player = script.Parent.Parent.Parent
wait(1)
local Character = player.Character

while wait() do
local Humanoid = Character:WaitForChild("Humanoid")
local shrink_val = 0.4
	if player.leaderstats.Strength.Value == 0 then
		Humanoid.BodyDepthScale.Value = 0.4
		Humanoid.BodyHeightScale.Value = 0.4
		Humanoid.BodyWidthScale.Value = 0.4
		Humanoid.BodyProportionScale.Value = 0.4
		Humanoid.HeadScale.Value = 0.4
		script.Parent.CharacterSize.Value = 0.4
	else if player.leaderstats.Strength.Value <= 30 and player.leaderstats.Strength.Value >= 20 then
			Humanoid.BodyDepthScale.Value = 0.5
			Humanoid.BodyHeightScale.Value = 0.5
			Humanoid.BodyWidthScale.Value = 0.5
			Humanoid.HeadScale.Value = 0.5
			Humanoid.BodyProportionScale.Value = 0.5
			script.Parent.CharacterSize.Value = 0.5
		end
	end
end

I also have another script that I tried below. (This script is Regular script in ServerScriptService)


game.plrs.plrAdded:Connect(function(plr)
	plr.CharacterAdded:connect(function(character)
		local strength = plr.leaderstats.Strength.Value
		strength:GetPropertyChangedSignal("Value"):Connect(function()
		local humanoid = character.Humanoid
		while wait( ) do
			if plr.leaderstats.Strength.Value == 0 then
				humanoid:WaitForChild("BodyDeptScale").Value = 0.4
				humanoid:WaitForChild("BodyHeightScale").Value = 0.4
				humanoid:WaitForChild("BodyWidthScale").Value = 0.4
				humanoid:WaitForChild("HeadScale").Value = 0.4
			end
			 if plr.leaderstats.Strength.Value >= 30 then
				humanoid:WaitForChild("BodyDeptScale").Value = 0.5
				humanoid:WaitForChild("BodyHeightScale").Value = 0.5
				humanoid:WaitForChild("BodyWidthScale").Value = 0.5
				humanoid:WaitForChild("HeadScale").Value = 0.5
			end
			if plr.leaderstats.Strength.Value >= 50 then
				humanoid:WaitForChild("BodyDeptScale").Value = 0.55
				humanoid:WaitForChild("BodyHeightScale").Value = 0.55
				humanoid:WaitForChild("BodyWidthScale").Value = 0.55
				humanoid:WaitForChild("HeadScale").Value = 0.55
			end
			if plr.leaderstats.Strength.Value >= 150 then
				humanoid:WaitForChild("BodyDeptScale").Value = 0.6
				humanoid:WaitForChild("BodyHeightScale").Value = 0.6
				humanoid:WaitForChild("BodyWidthScale").Value = 0.6
				humanoid:WaitForChild("HeadScale").Value = 0.6
			end
			if plr.leaderstats.Strength.Value >= 275 then
				humanoid:WaitForChild("BodyDeptScale").Value = 0.65
				humanoid:WaitForChild("BodyHeightScale").Value = 0.65
				humanoid:WaitForChild("BodyWidthScale").Value = 0.65
				humanoid:WaitForChild("HeadScale").Value = 0.65
			end
			if plr.leaderstats.Strength.Value >= 550 then
				humanoid:WaitForChild("BodyDeptScale").Value = 0.75
				humanoid:WaitForChild("BodyHeightScale").Value = 0.75
				humanoid:WaitForChild("BodyWidthScale").Value = 0.75
				humanoid:WaitForChild("HeadScale").Value = 0.75
			end
			if plr.leaderstats.Strength.Value >= 1000 then
				humanoid:WaitForChild("BodyDeptScale").Value = 0.85
				humanoid:WaitForChild("BodyHeightScale").Value = 0.85
				humanoid:WaitForChild("BodyWidthScale").Value = 0.85
				humanoid:WaitForChild("HeadScale").Value = 0.85
			end
			if plr.leaderstats.Strength.Value >= 5000 then
				humanoid:WaitForChild("BodyDeptScale").Value = 0.95
				humanoid:WaitForChild("BodyHeightScale").Value = 0.95
				humanoid:WaitForChild("BodyWidthScale").Value = 0.95
				humanoid:WaitForChild("HeadScale").Value = 0.95
			end
			if plr.leaderstats.Strength.Value >= 15000 then
				humanoid:WaitForChild("BodyDeptScale").Value = 1.5
				humanoid:WaitForChild("BodyHeightScale").Value = 1.5
				humanoid:WaitForChild("BodyWidthScale").Value = 1.5
				humanoid:WaitForChild("HeadScale").Value = 1.5
			end
		end
		end)
	end)
end)

Thank you!!

2 Likes