HumanoidDescription problem with no error

local function applyAppearance()
	local humanoidDescription = game.Players:GetHumanoidDescriptionFromUserId(localPlayer.UserId)
	task.wait(0.5)
	if player:WaitForChild("stats"):WaitForChild("Gender").Value == "Male" then
	humanoidDescription.Torso = 376532000
	humanoidDescription.LeftArm = 376530220
	humanoidDescription.RightArm = 376531012
	humanoidDescription.LeftLeg = 376531300
	humanoidDescription.RightLeg = 376531703
		task.wait(0.5)
	else
	if player:WaitForChild("stats"):WaitForChild("Gender").Value == "Female" then
			humanoidDescription.Torso = 376547767
			humanoidDescription.LeftArm = 376547633
			humanoidDescription.RightArm = 376547341
			humanoidDescription.LeftLeg = 376546668
			humanoidDescription.RightLeg = 376547092
			humanoidDescription.HeightScale = 0.90
	end
	task.wait(0.5)
	local Newhumanoid = Oldhumanoid:Clone()
	Newhumanoid.Parent = game.Workspace.MenuScreen:FindFirstChild("Rig")
	Oldhumanoid:Destroy()
	Newhumanoid:ApplyDescription(humanoidDescription)
	end
end

applyAppearance()

trying to change the body based on gender value, but no errors and was working before i added the packages?

this might be silly but add character.added and load it