Builtin Library
README.md
temp.run
Execute Luau code and automatically clean up the entities it creates after a timeout. It records which entities exist before and after the code runs, identifies the newly-created ones, and despawns them once the duration elapses. Useful for temporary visualizations, test setups, and previews that should not leak into the scene. Pass the code to run and an optional lifetime in seconds; the result carries the code's return value and the list of entities scheduled for cleanup.