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

Script that changes player's size on spawn doesn't work?

Asked by 4 years ago

I tried making a script where when a player spawns, their size is changed but it does not work. Here is the code.

game:GetService("Players").PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(char)
local hum = char:WaitForChild("Humanoid")
char:WaitForChild("Humanoid").Size = 0.5
char:WaitForChild("Humanoid").WalkSpeed = 20
end)
end)

1 answer

Log in to vote
0
Answered by 4 years ago

Humanoid is not a part, you cannot change the size of a humanoid. If you want to change the size of the player, you could change the values under the humanoid such as the BodyHeightScale, BodyDepthScale, BodyWidthScale etc.

0
when I did char:WaitForChild("Humanoid").BodyHeightScale = 0.5 nothing happened Sadwowow21 57 — 4y
0
They are NumberValues, you must set their values: char:WaitForChild("Humanoid").BodyHeightScale.Value = 0.5 thatwalmartman 404 — 4y
Ad

Answer this question