Roblox giving Mass instead of AssemblyMass

Hello I have trouble to figure why my script looks for HumanoidRootPart’s mass instead of checking the AssemblyMass :frowning:

local function reduceMass(player)
	local character = player.Character
	if character then
		local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")
		if humanoidRootPart then
			local initialMass = humanoidRootPart.AssemblyMass
			print("Player: " .. player.Name .. " - Initial Mass: " .. initialMass)

			if initialMass > 20 then
				for _, part in ipairs(character:GetDescendants()) do
					if part:IsA("BasePart") and part.Name ~= "UpperTorso" and part.Name ~= "LowerTorso" then
						part.Massless = true
					end
				end

				local finalMass = humanoidRootPart.AssemblyMass
				print("Player: " .. player.Name .. " - Final Mass: " .. finalMass)
			end
		end
	end
end

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		reduceMass(player)
	end)
end)

for _, player in ipairs(game.Players:GetPlayers()) do
	reduceMass(player)
end

image
image
image

Individual baseparts have a ‘Mass’ property: BasePart | Documentation - Roblox Creator Hub

Try using that on the rootpart.

I’m aware but I wanted to use AssemblyMass :frowning:

I am not getting the same result, you must already have another script that is setting massless to true before this script. Perhaps you are using StarterCharacter or something.

no this is in ServerScriptService only