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

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

Asked by 5 years ago

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

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

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)

0
Thanks! CaptainD_veloper 290 — 5y
0
:findFirstChild is deprecated, use :FindFirstChild ScrubSadmir 200 — 5y
0
ok ill edit that rn kizi3000 88 — 5y
Ad

Answer this question