Scale Player Down

Hello everyone, I am trying to make a button where if you click once it scales your character down to like the size of a kid. this is what i have but it keeps erroring.

-- Reference the button you want to click to resize the character
local resizeButton = script.Parent -- Change 'script.Parent' to the path of your button

-- Reference your character
local character = game.Players.LocalPlayer.Character

-- Function to resize the character down
local function resizeCharacter()
	-- Modify the character's size here
	character:FindFirstChild("Humanoid").BodyHeightScale = 0.5 -- Adjust the scale as needed
	character:FindFirstChild("Humanoid").BodyWidthScale = 0.5 -- Adjust the scale as needed
	character:FindFirstChild("Humanoid").BodyDepthScale = 0.5 -- Adjust the scale as needed

-- Connect the button click event to the function
1 Like

trying doing character:ScaleTo(0.5)

1 Like

what’s the error?


The good old “BodyHeightScale” is not a valid member of workspace.username.Humanoid!!! Yes so these scale factors are ValueBases, means you have to do humanoid.BodyHeightScale.Value = number; Idk why but this error always tricks me up as well.

Alternatively you can use the humanoid:GetAppliedDescription() and then description.BodyWidth = xxx then humanoid:ApplyDescription(description) Although this is inconvenient when you’re trying to tween the scales.

As @gameknight_10 mentioned, try doing character:ScaleTo(scalefactor)

1 Like

thanks for the help guys but i found out that instead of doing it from the client its just easiest to do it by the server.

1 Like