Cleanup discipline
Spawning is easy. Cleaning up is the part that separates scripts that work from scripts that destroy servers. If you spawn entities and never delete them, the world fills with ghost objects, entity counts climb, and the server lags or crashes. This lesson teaches the three moments cleanup has to happen, and why one of them cannot be done from the client at all.
Build it
Make the resource folder
Inside your server's resources folder, create this folder:
resources/qu_cleanup_discipline
Create the files
Create this exact file layout. Note the new server.lua compared to Lesson 24: