If with "chest" you mean the "treasure chest", this should do it:
1) copy and paste the code below to a script entity.
2) add an "OnInsert" from the chest to the scriptentity you made, pointing to the function "destroyItem"
Code: Select all
function destroyItem(self, item)
if item then
item.go:destroy()
end
end