like Marleys Ghost is saying:
Don't run your class script! just save it. Only a game sript (like fpscontroller.lua) can be run.
If your model doesn't have a phy file, then the editor automaticly creates one for you when you drag the object into your scene. I would build the main model in your 3d program and give it a convex hull physics shape. Then i would export the stones sepperatly and make no physics file for them. Then with code you can attach the stones to your model:
require("scripts/class")
local class=CreateClass(...)
function class:CreateObject(model)
local object=self.super:CreateObject(model)
--load the stones
self.stones=LoadModel ("abstract::stones.gmf")
--position stones or use the offset by exporting
self.stones:SetPosition(Vec3(-2.3,2.41,-1.79))
--parent stones to the main model
self.stones:SetParent (object.model)
--done with parenting
function object:Free(model)
self.super:Free()
end
end
instead of getplayerbody. U can perhaps just use : player. remember to set it to a global object. Setglobalobject("playercontroller",player)