I’m trying to direct a tool to a folder when it enters the backpack, but it runs this error. I understand that it breaks because I’m trying to set the parent at the same time as the game, but I haven’t found an effective solution to solve it. I’ve attempted to delay placing the object in the folder, but it just ends up breaking my other scripts that require perfect timing to work.
A delay as others have stated, would probably be the best option. I assume your other scripts are trying to reference the needed resources without any checks beforehand which cause them to break due to imperfect timing. In order to prevent the other scripts from breaking, you should also delay them appropriately. Maybe using Folder.ChildAdded:Wait() or an equal delay to the one used to parent the Tool.