You need to do the "steps to do after delay" that needs the result inside the after function. Example from trash in smart_inventory (delete item after 1 second delay): on_put = function(inv, listname, index, stack, player) minetest.after(1, function(stack) inv:set_stack(listname, index, ni...