Hi ZioRed,
Thanks and when I do that the error of course disappears but not the object so I must have something amiss in the variable. I tried the below as well but the object does not toggle on and off.
Perhaps it is not possible to hide an object when it is parented.
local vwep = LoadMesh("abstract::object1.gmf")
--inloop--------------------------------------
if KeyHit(KEY_F5)==1 then
if showthing==0 then
local object=0.6
vwep:SetParent(fw.main.camera,0)
vwep:SetPosition(Vec3(-0.0*object,-0.01*object,0.45*object),0)
showthing=1
vwep:Show()
else
showthing=0
vwep:Hide()
end
end