I'm trying to stop the player from falling, and for this i need to get the players mass. I can get the mass for most of the parts, but on the hat it outputs "GetMass is not a valid member of Accessory". Heres the script i'm using.
local character = player.Character
local plrMass = 0
for i, part in pairs(character:GetChildren()) do
if part:IsA("BasePart") or part:IsA("Accessory") then
plrMass = plrMass + part:GetMass()
end
end
How do i fix this?

1 comment
:GetMass() is a function of BasePart.