I searched, found no answers.
I fiddled around with other addons, trying my own stuff
for about an hour, and I can’t figure it out.
When someone spawns a prop, I want to get the mass of that prop.
But nothing works.
function GM:OnEntityCreated( prop )
if prop:GetClass() == “prop_physics” then
mass = prop:GetPhysicsObject():GetMass()
I get this error:
[lua] [@gamemodes\ \gamemode\init.lua:???] Tried to use invalid object (type IPhysicsObject) (Object was NULL or not of the right type)(Hook: OnEntityCreated) [/lua]