How do you run the script? Vision Assistant lets you create a vi which you can add to your robot project. Also, for it to work you need to ftp the template file to the cRIO and use that path in the vi.
I highly suggest you take a look at NI's Two Color Tracking Demo found
here. It is very easy to integrate into an existing project and works well.