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)

2 comments
when I did char:WaitForChild("Humanoid").BodyHeightScale = 0.5 nothing happened
They are NumberValues, you must set their values: char:WaitForChild("Humanoid").BodyHeightScale.Value = 0.5