If your script periodically cannot find an object, you need to use one of the Wait methods (WaitWindow, WaitItem, WaitWinFormsObject, etc.) to obtain it. They wait for the target object within the given timeout.
Depending upon what you are doing, you might want to consider reading up on the various "Wait" methods. While I don't know the script code you are trying to run, the symptoms you describe sound very much like cases where the scripts, running at full speed, move through tasks faster than the application under test can generate the objects.
Take a look in the TC help for methods like WaitWindow and WaitWinFormsObject and WaitItem. Those are just three examples of several such items.
If you're using TC 6.51, you can look into implementing and using the Script Extension noted here