Objects don't show up when i restart the scene

After using this code to remove objects so the game will run smoothly,
IMG_20240114_105037_898

It works just fine. However, when i restart the scene with an actuator, some objects that hav parents don’t show up while some show up.
Please help

Nvm. I found what the error was