You might have luck if you post your script in the '3ds Max Programming' forum. There may just be a small syntax error in the script. It would help if you showed what the error is as that often gives a clue as to why the script fails.
Other than that, Martin is correct in options to use to make it disappear. Make is '0.0' in size, have it just instantly move far away on the next frame, 'visibility' track, etc.
Also, you could have two files, one file is frame 0-99 and the other file is frame 100-200. In the 100-200 file, delete the object but keep the others.
Send the 0-99 file to Lumion and then add the 100-200 file after it in Lumion. Now with the two pieces, you have a 0-200 file in Lumion.
Rob Holmes
------------------------------------------------------------------------------------------------------------------------------------------
3ds Max (2023-2025), V-Ray 6.2, Ryzen 9 3950-X Processor, DDR 4 128MB, Gigabyte Aorus X570 Master motherboard, Sabrent Rocket NVMe 4.0 M.2 drives, NVidia RTX 4090, Space Pilot Pro, Windows 11 Pro x64, Tri-Monitor, Cintiq 13HD, Windows 11 x64
------------------------------------------------------------------------------------------------------------------------------------------