Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How would I raise a character uppertorso size without them dying?

I have a script that raises players upper torso size, but when it does, the player always dies and this always happens every second. Is there a way to fix the player not dying when his uppertorso size is raised? Here is my script:

game.Players.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function(char)
	while wait(1) do
		local size = plr.leaderstats.Mass.Value/10
		char.UpperTorso.Size = Vector3.new(size,size,size)
	end
		end)
	end)

1 answer

✓ Accepted answer

I'm Assuming You Are Trying To Change The Entire Characters Size? If So Then Try This:

game.Players.PlayerAdded:Connect(function(plr)
    plr.CharacterAdded:Connect(function(char)
    while wait(1) do
        local size = plr.leaderstats.Mass.Value/10
game.Workspace:FindFirstChild(plr.Name).Humanoid:FindFirstChild('BodyHeightScale').Value = size
game.Workspace:FindFirstChild(plr.Name).Humanoid:FindFirstChild('BodyDepthScale').Value = size
game.Workspace:FindFirstChild(plr.Name).Humanoid:FindFirstChild('BodyWidthScale').Value = size
game.Workspace:FindFirstChild(plr.Name).Humanoid:FindFirstChild('HeadScale').Value = size
game.Workspace:FindFirstChild(plr.Name).Humanoid.HipHeight = size * 2
		end
	end)
end)

Try putting it in server script service, also if it doesn't work then try making sure that your leader stats are correct. (The Script Should Still Work If You Remove Either, The BodyHeightScale, The BodyDepthScale, The BodyWidthScale, Or The HeadScale) (But Just In Case You Should Still Try Without Removing Them First)

3 comments

0

Thanks!

0

:findFirstChild is deprecated, use :FindFirstChild

0

ok ill edit that rn

This discussion is preserved as it was. New answers, comments, and votes are closed.