GetMass

Constructor:

GetMass()

Description

Retrieves the mass of the object itself.

Return Value

Type Description
float Object mass

Examples

Create a part p1 and retrieve its mass.

local p1 = RWObject.Create("Part") -- create a part
p1.Position = Vector3(0,10,0) -- assign a value to the part position
p1.Name = "p1" -- set the part name as p1
wait(1) -- wait 1
local MassValue = p1:GetMass() -- retrieve the mass
print(tostring(MassValue)) -- output the mass